Simple question about MySQL embedded application.
Simple question about MySQL embedded application.
Hi ,
I am wondering how I can use the embedded MySQL server in a Delphi application via UniDAC? Do you have a demo for this ? Better give me a step by step guide if possible.
Thanks very much.
I am wondering how I can use the embedded MySQL server in a Delphi application via UniDAC? Do you have a demo for this ? Better give me a step by step guide if possible.
Thanks very much.
UniDACDemo doesn't have the example of working with Embedded MySQL Server. That's why you can look at this example only in MyDACDemo.
You can connect to the Embedded MySQL server with UniDAC in the following way:
The --basedir parameter sets the base path for the Embedded MySQL server. All paths are usually used relatively to the base path. The --datadir parameter sets the path to the data directory.
You can connect to the Embedded MySQL server with UniDAC in the following way:
Code: Select all
UniConnection.ProviderName := 'MySQL';
UniConnection.Database := DatabaseName;
UniConnection.SpecificOptions.Values['Embedded'] := 'True';
UniConnection.SpecificOptions.Values['EmbeddedParams'] := '--basedir=.'#13#10'--datadir=data';
Last edited by AndreyZ on Wed 13 Oct 2010 11:07, edited 1 time in total.
-
- Posts: 19
- Joined: Sat 11 Jun 2011 07:44
Re: Simple question about MySQL embedded application.
I tryed this but i keep getting error about can't load libmysql.dll, but it is in the same dir where the exe fil is
using firemonkey
mysql 5.5
unidac 4.5.9
"MySQL client library couldn't be loaded. Please place libmysqld.dll file to system folder (included to PATH) or to the folder with executable unit of main program."
using firemonkey
mysql 5.5
unidac 4.5.9
"MySQL client library couldn't be loaded. Please place libmysqld.dll file to system folder (included to PATH) or to the folder with executable unit of main program."
Re: Simple question about MySQL embedded application.
Please make sure you placed the libmysqld.dll (and not libmysql.dll) library to the directory where the executable file of your application is located. Also, please note that you should use 32-bit libmysqld.dll for 32-bit applications, and 64-bit libmysqld.dll for 64-bit applications.
Re: Simple question about MySQL embedded application.
Hello Andrey
Actually I am trying to make an embedded connection with Unidac and MySQL. I have the dll file in the same directory but I get the same message: "MySQL client library couldn't be loaded. Please place..."
Is there something I am missing?
Regards
Actually I am trying to make an embedded connection with Unidac and MySQL. I have the dll file in the same directory but I get the same message: "MySQL client library couldn't be loaded. Please place..."
Is there something I am missing?
Regards
Re: Simple question about MySQL embedded application.
Please try using the following code:Does this code shows a message? If yes, please specify the exact message.
Code: Select all
procedure TForm1.Button1Click(Sender: TObject);
var
handle: HMODULE;
begin
handle := LoadLibrary('libmysqld.dll');
if handle = 0 then
ShowMessage(SysErrorMessage(GetLastError));
end;