Distributing dbExpress Application Error

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for MySQL in Delphi and C++Builder
Post Reply
marty6
Posts: 1
Joined: Thu 05 Oct 2006 23:54

Distributing dbExpress Application Error

Post by marty6 » Fri 06 Oct 2006 00:03

I just got dbExpress for delphi 2006. I built a simple project, and I ran the exe on another box. On start-up it said: can't find dbexpmda.dll I was under the impression that, by using the direct connection (without libmysql.dll) I wouldn't need to include any other files with my program.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 06 Oct 2006 13:52

dbexpmda.dll is the driver itself that is used by dbExpress. It can access MySQL server directly without client library (libmysql.dll). You can embed the driver into your exe file so that no dlls will be necessary only if you have source code of it. Source code of the driver is available for registered users of DbxMda Professional version.

gjking
Posts: 3
Joined: Fri 27 Apr 2007 13:02

embedding dbexpmda.dll in exe

Post by gjking » Fri 27 Apr 2007 18:15

>You can embed the driver into your exe file

I am sure I have done this previously but can not remember on new machine and set up. Could someone please outline the specific steps to ensure this happens and can be deployed without additional .dll ?

many thanks in advance

graham

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Sat 28 Apr 2007 15:09

If you are user of DbxMda Professional Version, you can use something like this:

Code: Select all

uses
  ...dbxmda, ...;
...
initialization
  RegisterDbXpressLib(@getSQLDriverMySQLDirect);
end;
But you should keep in mind that you can't statically link more than one driver.
This is restriction of dbExpress technology.

gjking
Posts: 3
Joined: Fri 27 Apr 2007 13:02

ongoing problems compiling for deploying Direct connection

Post by gjking » Fri 11 May 2007 08:08

re: uses
...dbxmda, ...;
...
initialization
RegisterDbXpressLib(@getSQLDriverMySQLDirect);
end;

thanks, but with version 3.0 I had problem compiling,

and now have another with the new 3.20 version when put in uses ...dbxmda...

[Error] CRAccess.pas(88): Undeclared identifier: 'TConnLostCause' [Fatal Error] CRAccess.pas(490): File not found: 'CRConnectionPool.dcu'

I now have CRAccess unit, which was missing previously, but do not have CRConnectionPool.dcu. (although there is CRConnection.dcu)

this is with delphi 7 implementation

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 11 May 2007 15:09

DbxMda and MyDAC (our Delphi Data Access Components for MySQL) use same core, but some core functionality cannot be used in DbxMda. The LITE directive splits this functionality, so both the driver itself and the application in which this driver is built, must be compiled with the LITE define.

gjking
Posts: 3
Joined: Fri 27 Apr 2007 13:02

Lite directive

Post by gjking » Fri 11 May 2007 15:33

OK - could you please explain the exact form and position of placing the LITE directive(s) ?

thanks

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 11 May 2007 15:54

Call the "Project | Options" dialog from the IDE menu, and add the LITE define to the "Conditional defines" edit on the "Directories/Conditionals" tab.

Post Reply