worked for me.
On Saturday, May 19, 2012 3:48:17 AM UTC-7, Mohammed BENJELLOUN wrote:
> Hello,
> I'm trying to use Linq 2 with mysql in console application with v4
> of .net framework,
> I successfully generate .cs and .dbml files and copy them in my
> project (with DbMetal.exe.config file). I already add references
> (dblinq, dblinq.mysql,dblinq.sqlserver,mysql.data,system.data.linq).
> I think that's all i need to do ?
> now when i compil my project i have somme errors :
> Error 2 Cannot implicitly convert type
> 'DbLinq.Data.Linq.Table<ConsoleApplication2.Client>' to
> 'System.Data.Linq.Table<ConsoleApplication2.Client>' c:\users
> \benjelloun\documents\visual studio 2010\Projects
> \ConsoleApplication2\ConsoleApplication2\file.designer.cs 73 12
> ConsoleApplication2
> and :
> Error 1 'MySql' is a 'namespace' but is used like a
> 'type' c:\users
> \benjelloun\documents\visual studio 2010\Projects
> \ConsoleApplication2\ConsoleApplication2\file.designer.cs 26 61
> ConsoleApplication2
> here :
> [global::System.Data.Linq.Mapping.ProviderAttribute(typeof(MySql))]
> To resolve this problems i comment the first and for the second i
> change it to :
> [global::System.Data.Linq.Mapping.ProviderAttribute(typeof(DbLinq.MySql.MyS qlSqlProvider))]
> The problem now is when i exetute the application, it cannot
> initialize the database connection in DataContext file :
> public MFPMonitorDbServer(string connectionString) :
> base(connectionString)
> {
> this.OnCreated();
> }
> and i have this error (no source available) :
> The file 'z:\Development\DbLinq-0.20.1\src\DbLinq\Data\Linq
> \DataContext.cs' does not exist.
> and i don't have this path in my computer
> NOTE :
> i have the same problem if i use .cs file allone (without .dbml file)
> Please help me ??