I have created one table in MySQL database. I want to use that table in my C sharp application through ODBC. I have installed the ODBC driver also. I have created the project in visual C#, Smart device and WINCE 5.0. Now i want my application will interact with table through ODBC.

While including the name space System.Data.Odbc i haven't found the ODBC name space in the Data object. I found only System.Data.Common,System.Data.SqlClient and System.Data.SqlTypes. Without having ODBC name space I can't create a new connection to access the data base. I don't have any idea where the problem is ? Can any body please let me know where the problem is?

Vijay Bhaskar

Thanks for replying.

Even while adding the reference also it is displaying only following options.

System.Data, System.Data.SqlClient and System.Data.SqlServerCe

Hence i am not able to add any name spaces which are belonging to ODBC.

Can u please provide any other solution if you know.

Vijay Bhaskar

Try to add Reference to project

You have to use System.DataOdbc.OdbcConnection

see http://www.carlprothman.net/Default.aspx?tabid=86#ODBCManagedProvider

Use the MySql .net connector 5.2. It is much faster. Numerous samples included.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.