I'm writing an application that reads from a MySQL database and migrates data into a SQL Server database. I've chosen to write this in C# because of it's built in SQL structures and functionality. I was wondering, would it be possible to use the System.Data.SqlTypes.* structures in my classes where data from MySql will be read into?
ie.
// Pseudo code
IDataReader reader = /* { return DB reader } */;
while (reader.Read())
{
SqlString str = (SqlString) reader["someVarCharField"];
SqlBoolean b = (SqlBoolean) reader["someTinyIntField"];
}
Will this work or is there a better way of doing this?