MySQL Managed Providers

Is this what I should be using with a MySQL database?http://sourceforge.net/projects/mysqlnet/

My application is a for church management and consists of numberous fields for data entry. How do I go about connecting the app. to a database (of any kind)? Do I use datasets?

Thanks!

[407 byte] By [Trenton1] at [2008-2-5]
# 1
Hi,

Yes you are on the right track ByteFx.Data has been acquired and made as the official managed provider for ADO.NET

For Connecting to a database you would need to use the MySqlConnection class.
Here is some sample code which will fill the dataset with data:

--
String query = "SELECT * FROM MyTable";

String ConnectionString = "Database=Test;Data Source=localhost;User Id=username;Password=pass";

MySqlConnection conn = new MySqlConnection(ConnectionString);

MySqlCommand objMySqlCommand = new MySqlCommand(query);

objMySqlCommand.set_Connection(conn);

MySqlDataAdapter adapter = new MySqlDataAdapter();

adapter.set_SelectCommand(objMySqlCommand);

DataSet dataset = new DataSet();

adapter.Fill(dataset);
--

Regards,
Vikram

Vikram at 2007-9-9 > top of Msdn Tech,Visual J#,Visual J# General...