Question DataSet for ODBC

Joined
Jan 6, 2012
Messages
5
Programming Experience
Beginner
Can you give me a guide in making a dataset for VB.NET via ODBC and MySQL as a Database? I need your help
 

jmcilhinney

VB.NET Forum Moderator
Staff member
Joined
Aug 17, 2004
Messages
14,723
Location
Sydney, Australia
Programming Experience
10+
Is there a specific reason that you want to use ODBC? It would be a far better idea to use the Connector/Net provider, which is a free download from the MySQL web site.

Regardless of that, you don't "make a DataSet" via ODBC. The DataSet itself is completely independent of the data access technology used. In fact, you can use a DataSet even if you're not connecting to a database if you want. You create the DataSet, create a data adapter from the appropriate provider (MySqlDataAdapter, OdbcDataAdapter or whatever) and then call Fill. It's the same regardless of the provider. All that changes is the connection string and maybe the SQL syntax a little. Any code examples you have seen for populating a DataSet from any database (Access, SQL Server, etc) are relevant.
 
Top Bottom