Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MySQL data Access Class
Message
From
12/07/2006 03:56:06
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
MySQL data Access Class
Miscellaneous
Thread ID:
01135585
Message ID:
01135585
Views:
61
Hi

I am trying to create a data access class for mySQL, I have basically copied the mmdataAcessClassOracle, and replaces the Oracle with MySQL, but when I try to compile I get two errors.
II have this at the top of my class

using MySql.Data.MySqlClient;

Error 1 Cannot convert type 'System.Data.Common.DbCommandBuilder' to 'MySql.Data.MySqlClient.MySqlCommandBuilder' DataAccessMySQL.cs

protected virtual MySqlCommandBuilder CommandBuilder
{
get
{
// If a Command Builder doesn't exist, create one
if (this._commandBuilder == null)
{
this._commandBuilder = (MySqlCommandBuilder) this.CreateCommandBuilder(this.DataAdapter);
}
return this._commandBuilder;
}
set { this._commandBuilder = value; }

}


Error 2 Cannot implicitly convert type 'MySql.Data.MySqlClient.MySqlCommandBuilder' to 'System.Data.Common.DbCommandBuilder DataAccessMySQL.cs


public override DbCommandBuilder CreateCommandBuilder(IDbDataAdapter dataAdapter)
{
return new MySqlCommandBuilder((MySqlDataAdapter)dataAdapter);
}


Any ideas what I am doing wrong or have not done?

Or even better will there be a mySQL data access class coming soon?

TIA
Stuart
Next
Reply
Map
View

Click here to load this message in the networking platform