using a dll file

using a dll file

Postby Larsp777 » Sat 19 Nov 2005 16:39

Hi! I made an dll file that contains a connection to a SQLserver database. This works fine.

Now I want to change the connection to a MySql database still using the the same connections only changing SqlConnection to MySqlConnection and SqlDataReader to MySqlDataReader and so on.

I use the following line:

using CoreLab.MySql;

The problem occurs when I try to turn my .cs file into a .dll file. The compiler complaints that it doesn't recognise the nameSpace CoreLab. My guess is that I'm missing a reference to the assembly, but how do you do that in a .dll file?
Larsp777
 
Posts: 2
Joined: Sat 19 Nov 2005 16:19

Postby Serious » Tue 22 Nov 2005 12:52

Changing class names and using directives is not enough to migrate from MsSQL to MySQL.
You have to update references of your project, check data types, SQL queries and connection strings.
We recommend start using MySQLDirect .NET with its demo projects which can be found in 'Samples' folder in MySQLDirect .NET installation directory.

To resolve your current problem you have to add CoreLab.MySql.dll to the project references (See 'References' node in the 'SolutionExplorer' window).
Serious
 


Return to dotConnect for MySQL