Parameterized connection

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
maciejmt
Posts: 27
Joined: Sun 25 Apr 2010 14:14

Parameterized connection

Post by maciejmt » Wed 04 May 2011 09:34

Hi,

I'd like from thread in main application, send parameters of connection (user, pass, database) to DLL. How to do easily (other passing 3 parameters) ?
I don't see property connection string or other...

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Wed 04 May 2011 13:09

TMyConnection doesn't have the ConnectionString property. You should set all connection parameters separately, like this:

Code: Select all

  MyConnection.Server := ServerName;
  MyConnection.Database := DatabaseName;
  MyConnection.Username := Username;
  MyConnection.Password := Password;
In DLL you can pass these properties as parameters of your own procedure.

Post Reply