I am trying to use MySQL 5 with C#. I downloaded MySQL driver on mysql.com and installed it. I can now connect to MySQL in C# with the following code.
    string ConString = "SERVER=192.168.10.104;";
    ConString += "DATABASE=test;";
    ConString += "UID=user;";
    ConString += "PASSWORD=password;";
    MySqlConnection connection = new MySqlConnection(ConString);
    MySqlCommand command = connection.CreateCommand();
    MySqlDataReader Reader;
    command.CommandText = "select * from j_people";
    connection.Open();
    Reader = command.ExecuteReader();
The problem is that what if I change the database server to MS SQL Server or Oracle later?
Isn't there a database abstraction layer in C#?
I guess it would be ADO.NET, but I can't seem to find an practical example of ADO.NET with MySQL.
 
     
     
     
     
     
     
     
    