Results 1 to 10 of 10

Thread: [RESOLVED] [2005] Do anyone uses mysql-connector-net?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2007
    Location
    Hong Kong
    Posts
    384

    Resolved [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?

  2. #2
    PowerPoster Jenner's Avatar
    Join Date
    Jan 2008
    Location
    Mentor, OH
    Posts
    3,712

    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

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2007
    Location
    Hong Kong
    Posts
    384

    Re: [2005] Do anyone uses mysql-connector-net?

    Quote 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?

  4. #4
    PowerPoster Jenner's Avatar
    Join Date
    Jan 2008
    Location
    Mentor, OH
    Posts
    3,712

    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.

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2007
    Location
    Hong Kong
    Posts
    384

    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.

  6. #6
    PowerPoster Jenner's Avatar
    Join Date
    Jan 2008
    Location
    Mentor, OH
    Posts
    3,712

    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.

  7. #7
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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.

  8. #8
    PowerPoster Jenner's Avatar
    Join Date
    Jan 2008
    Location
    Mentor, OH
    Posts
    3,712

    Re: [2005] Do anyone uses mysql-connector-net?

    Quote 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.

  9. #9

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2007
    Location
    Hong Kong
    Posts
    384

    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

  10. #10

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2007
    Location
    Hong Kong
    Posts
    384

    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
  •  



Click Here to Expand Forum to Full Width