importing corelabs.mysql namespace

importing corelabs.mysql namespace

Postby jcrabtreesla » Thu 20 Jul 2006 15:11

I am very new to MYSQL. My company has purchased your MySQL.net program. I have a newbie question.

First, I have installed the software correctly and I am able to view the database in the Solution Explorer (VS 2005 Pro) and also the DB explorer. I am able to add tables, etc. I have been able to create a basic adapter and datatable object through the wizards in VS 2005.

What I want to do is create my own custom dataReader object. In the past I have used SQL and to accomplish this you must import system.data.sqlclient to be able to access the dataReader object along with the proper sqlconnection and sqlcommand objects. I have tried to replicate my old methods using this sqlclient, but I have run into numerous problems.

I think I have figured out that I need to add the correct MySQL namespace using an import. I have seen it used on other forum posts as imports CoreLabs.MySQL (or some very similar syntax). When I tried to do the same, the intellesense gave me no such options.

My question is how do I get that namespace into my project? I am pretty sure that is my problem, but if someone has other suggestions, please let me know. I can provide sample code if you need, but I think my code would be solid if I have the right namespace imported.

Thanks for helping a newbie
jcrabtreesla
 
Posts: 12
Joined: Thu 20 Jul 2006 15:01

Postby Alexey » Thu 20 Jul 2006 15:20

If you have MySqlConnection component on your form add this string to the code (assuming you are using VB):
Code: Select all
Imports CoreLab.MySql

otherwise add our assembly to your project first.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Postby jcrabtreesla » Thu 20 Jul 2006 15:38

Thanks, but that is my problem. I can't add "imports CoreLab.MySQL". Maybe I don't have something installed properly? How do I add your assembly to my project? That might be my problem. Thanks
jcrabtreesla
 
Posts: 12
Joined: Thu 20 Jul 2006 15:01

Postby jcrabtreesla » Thu 20 Jul 2006 18:40

Success!

I found you need to add a reference to the assembly files.

Right Click on the project in the solution explorer
Select Add Reference
Add all CoreLabs MySQL assemblies
jcrabtreesla
 
Posts: 12
Joined: Thu 20 Jul 2006 15:01

Postby Alexey » Fri 21 Jul 2006 06:10

As i told you if you have MySqlConnection component on your form you do not have to add our assembly because it is added automatically for you.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43


Return to dotConnect for MySQL