Help with embedding MySql into C# .net windows App
Help with embedding MySql into C# .net windows App
I am fairly new to c# as most of my background is in Java. But I have the task of embedding mySql 4.1.7 into a c# windows app. It seems that all of the information on the web assumes a bit of higher knowledge than I have about embedding. If you find the time, could you explain a little bit about specifically how to embed mySql into a c# program. Also I am aware that there needs to be some sort of c++ go between. I would also need some help getting an embedded mySql. I think the file is something like libmysqld. Any help would be nice.
Thanks
Thanks
Re: Help with embedding MySql into C# .net windows App
You can find a detailed instruction how to use MySQL Embedded Server in MySQLDirect .NET documentation.
Thanks, this seems very helpful. However I am having trouble getting the libmysqld compiled as I don't have 6.0, only .NET and I am unable to follow the instructions for the changes to be made in .NET. Are there insturctions for how to compile the dll in .NET, or is there a way that you could simply send me the recompiled libmysqld.dll?
Thanks,
Jacob
Thanks,
Jacob
I recieved the dll file but I am still having problems getting into my project. I am unable to add it as a reference because it does not realize that it is a valid COM or dll component. When I create a mysql connection object, and set the embedded property to true, it says that it is unable to load the libmysqld.dll. Are there any core lad examples of how to use embedded servers? Or any Idea what I am missing?
Thanks
Thanks
You shouldn't set reference to libmysqld.dll as it is unmanaged dll.
Try to place libmysqld.dll into WINNT\SYSTEM32 or to the folder with your application.
To use MySQL Embedded server you should configure it and set MySqlConnection.Embedded = true.
You can read about adjusting MySQL Embedded server in 'Configuration and Distribution' paragraph of 'Using
embedded server' article.
Try to place libmysqld.dll into WINNT\SYSTEM32 or to the folder with your application.
To use MySQL Embedded server you should configure it and set MySqlConnection.Embedded = true.
You can read about adjusting MySQL Embedded server in 'Configuration and Distribution' paragraph of 'Using
embedded server' article.
I placed the libmysqld.dll in the system32 folder, and when I set embedded = true on the sql connection, it seems to find it as it doesn't give me an error, but the program crashes. I have tried it several times in several different projects. Every time the program just crashes, no error message, or "not responding", simply stops running. if I take the .dll out of the system32 folder, the program works, but again the same error of not finding the dll
I guess I need a bit more explanation. It seems that putting in an ini file and refrencing the c:/MySql folder is talking about an install. I thought that the point of an embedded server is that we could only ship the dll file with the install and simply reference that. The hope is to not have to install mysql at all.
thanks again for all your help,
Jacob
thanks again for all your help,
Jacob
Hi,
I seem to have the same problem as jacobds. The program just stop when it try to open the connection to the embedded server.
Did you get it to work jacobds? If you did, I am very curious in how. Any help would be apreciated.
[email protected]
I seem to have the same problem as jacobds. The program just stop when it try to open the connection to the embedded server.
Did you get it to work jacobds? If you did, I am very curious in how. Any help would be apreciated.
[email protected]
Well, actually I gave up using MySQL. I decided to go with FireBird, and was able to embed that database with no problem. The only problem there is that the Data Provider that FireBird has is really still being developed and is not nearly as nice to use as the corelab's MySQL Dataadapter. What would really be nice is if Core Labs would whip out a nice Data Adapter for FireBird.
Sorry I couldn't be more help.
-Jacob
Sorry I couldn't be more help.
-Jacob
jacobds couldn't use MySQL embedded server by the next reasons:
- he tried to use tables from MySQL 4.1.7, but libmysqld that we sent has version 4.0. Thus tables must be created for MySQL 4.0
- MySQL server service was started
- after installing my.ini file VisualStudio IDE wasn't restarted.
-
- Posts: 729
- Joined: Thu 13 Dec 2007 10:24