Page 1 of 1

create a TSQLConnection at run-time and error "DLL/Shared Li

Posted: Wed 01 Dec 2004 16:50
by e arlati
I' m using BC++Builder 6 with mysql 4.1.7 and I'm evaluating your dbExpress trial 2.10

I try to create a TSQLConnection at run-time using the code show belowe
but when the program try to open the connection it get the error "DLL/Shared Library Name not Set"

what I was missing in this code ?

dbConn = new TSQLConnection(NULL);
dbConn->DriverName = "MySQL Direct (Core Lab)";
dbConn->GetDriverFunc = "getSQLDriverMySQLDirect";
dbConn->LibraryName = "dbexpmda.dll";
dbConn->KeepConnection = true;
dbConn->LoginPrompt = false;
dbConn->Params->Values["DriverName"] = "MySQL Direct (Core Lab)";
dbConn->Params->Values["HostName"] = "localhost";
dbConn->Params->Values["LibraryName"] = "dbexpmda.dll";
dbConn->Params->Values["DataBase"] = "SIV";
dbConn->Params->Values["User_Name"] = "root";
dbConn->Params->Values["Password"] = "";
dbConn->Params->Values["BlobSize"] = -1;

dbConn->Connected = true;

regards ,
Enzo Arlati [email protected]
AESYS Via Artigiani, 41 24060 Brusaporto (BG) - Italy
Tel. +39 (0)35.2924.182 Fax +39 (0)35 680030

create a TSQLConnection at run-time and error "DLL/Shared Li

Posted: Thu 02 Dec 2004 09:35
by e arlati
I setted also per property VendorLib as follow belowe and now the procedure is working
dbConn->VendorLib = "not used";


TSQLConnection * __fastcall TDataModule_PMV::NewSQLConnection( void )
{
TSQLConnection * dbConn = 0;

try
{
dbConn = new TSQLConnection(NULL);

dbConn->DriverName = "MySQL Direct (Core Lab)";
dbConn->LibraryName = "dbexpmda.dll";
dbConn->VendorLib = "not used";
dbConn->GetDriverFunc = "getSQLDriverMySQLDirect";
dbConn->Params->Values["DriverName"] = "MySQL Direct (Core Lab)";
dbConn->Params->Values["HostName"] = "localhost";
dbConn->Params->Values["DataBase"] = "SIV";
dbConn->Params->Values["User_Name"] = "root";
dbConn->Params->Values["Password"] = "";
dbConn->Params->Values["BlobSize"] = -1;

dbConn->KeepConnection = true;
dbConn->LoginPrompt = false;

dbConn->Connected = true;

}
catch( Exception & ex )
{
if( dbConn )
{
delete dbConn;
dbConn = 0;
}
String serr = Format( "[NewSQLConnection]ERRORE %s ",
ARRAYOFCONST(( ex.Message )) );
Util::mylog( serr );
}


return dbConn;
}