Dataset TableAdapter Configuration Wizard Error


 I'm connecting my Dataset Into MySQL Instance , I  newly created DataSet in Data Sources view, I select
Edit DataSet with Designer, I wrote the Needed SQL Statement Inside (What Data Should be loaded into the table) the syntax is : Select * from MyTable,I press next , next and before the I press the (Finish) button for the wizard it Displayed the following error:
ERROR[HY010][MYSQL][ODBC 3.51 Driver][mysqld-4.1.20]
Then I couldn't complete the wizard , how I solve this problem?
Who is Participating?
deanvanrooyenConnect With a Mentor Commented:

go to the mysql web site and downlad the MySQL connector for .net, ref the dlls in your project- I used it over a year ago and the namespace is based on the msql client so its almost as if you are using the ms sql stuff eg.
this is a bit of lame code and dont ever use inline sql but its a quick cop and paste to show you...

using MySql.Data.MySqlClient;
using MySql.Data.Types;

        DBConnectionStrings myconstr = new DBConnectionStrings();
        MySqlConnection conn = new MySqlConnection(myconstr.MySqlConnectionString);
        MySqlCommand myCmd = new MySqlCommand("select lname as last,fname as first,id,phone,cellphone,fax,address1 as addr1,address2 as addr2,city,state,zip,email,contact_type as type,bill_lender_approved as bla from contact where clientid = ?clientid", conn);
        myCmd.Parameters.Add("?clientid", MySqlDbType.Int32).Value = clientid;
        //open MySql and execute
        MySqlDataAdapter mysqlad = new MySqlDataAdapter();
        mysqlad.SelectCommand = myCmd;
        DataTable cd = new DataTable();
            GridViewContact.DataSource = cd.DefaultView;

All Courses

From novice to tech pro — start learning today.