|
-
Mar 4th, 2008, 12:41 PM
#1
Thread Starter
Hyperactive Member
[RESOLVED] [2005] Do anyone uses mysql-connector-net?
I have 3 items from my item box:
MySqlConnection
mysqldatadapter
MySqlCommand1
how to use them instead of my dataset?
-
Mar 4th, 2008, 01:20 PM
#2
Re: [2005] Do anyone uses mysql-connector-net?
You use them just like you'd use either the ODBC or SQLServer connector objects.
Use MySqlConnection to connect to a database
Use MySqlDataAdapter to create a link between the connection and the dataset
Use MySqlCommand to run a database command
-
Mar 4th, 2008, 01:33 PM
#3
Thread Starter
Hyperactive Member
Re: [2005] Do anyone uses mysql-connector-net?
 Originally Posted by Jenner
You use them just like you'd use either the ODBC or SQLServer connector objects.
Use MySqlConnection to connect to a database
Use MySqlDataAdapter to create a link between the connection and the dataset
Use MySqlCommand to run a database command
Do it as convenient as add new data sources wizard?
-
Mar 4th, 2008, 01:42 PM
#4
Re: [2005] Do anyone uses mysql-connector-net?
Yes if you have MySQL Connector .NET v5.1 or higher. Get the newer v5.2.1 if you can.
When you install it, be sure to have Visual Studio closed so it can install the IDE plugin so you can use the the New Data Source Wizard.
If you got it installed correctly, you'll see "MySQL Connector" under Installed Products on the splash screen, and the option for MySQL Database will be in the server explorer.
-
Mar 4th, 2008, 02:05 PM
#5
Thread Starter
Hyperactive Member
Re: [2005] Do anyone uses mysql-connector-net?
it seems that all right with the most updated version
I can select something and return in my dataset, but a exception is come out when I try to run the program:
Access denied for user 'project'@'my.router' (using password: NO)
I have added host "%".
and set the correct port.
-
Mar 4th, 2008, 03:56 PM
#6
Re: [2005] Do anyone uses mysql-connector-net?
Make sure you have access. Try it with the root account if permissions are giving you problems and work from there. By default, new users have no permissions in MySQL.
-
Mar 4th, 2008, 04:45 PM
#7
Re: [2005] Do anyone uses mysql-connector-net?
Just a word of caution - the wizards aren't exactly the best when it comes to MySql. If you face a namespacing issue, you will need to hand code.
-
Mar 4th, 2008, 04:52 PM
#8
Re: [2005] Do anyone uses mysql-connector-net?
 Originally Posted by mendhak
Just a word of caution - the wizards aren't exactly the best when it comes to MySql. If you face a namespacing issue, you will need to hand code.
Agreed, I hate the wizards and the limited databinding in the entirety of VB.NET and avoid them like the plague. I've never used the wizard nor any databinding from and datasets they create in any project I've ever done. I just know it can be done.
-
Mar 4th, 2008, 09:05 PM
#9
Thread Starter
Hyperactive Member
Re: [2005] Do anyone uses mysql-connector-net?
But I think we can get and set the dataset by vb.net text item right?
so I will try the root account and report later on
-
Mar 5th, 2008, 04:49 AM
#10
Thread Starter
Hyperactive Member
Re: [2005] Do anyone uses mysql-connector-net?
I find the solution. MySQL net connector has bug.Although I type the password in selecting MySQL database, the generating connection string doesn't contain my password.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|