I have 3 items from my item box:
MySqlConnection
mysqldatadapter
MySqlCommand1
how to use them instead of my dataset?
http://macao838.com/image/1204649567.JPG
Printable View
I have 3 items from my item box:
MySqlConnection
mysqldatadapter
MySqlCommand1
how to use them instead of my dataset?
http://macao838.com/image/1204649567.JPG
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?Quote:
Originally Posted by Jenner
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.
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.
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.
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.Quote:
Originally Posted by mendhak
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:)
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.