Thread View: borland.public.kylix.database.sqlservers
2 messages
2 total messages
Started by Andrey Kazakov
Wed, 07 May 2003 20:22
EDatabase exception
Author: Andrey Kazakov
Date: Wed, 07 May 2003 20:22
Date: Wed, 07 May 2003 20:22
37 lines
2032 bytes
2032 bytes
Hello!
I have got a problem connecting to DB and retriving data.
TSQLConnection *SQL_con = new TSQLConnection((TComponent *)0);
TStringList *Par_strs = new TStringList;
SQL_con->ConnectionName=AnsiString("MySQLConnection");
SQL_con->DriverName=AnsiString("MySQL");
SQL_con->GetDriverFunc=AnsiString("getSQLDriverMYSQL");
SQL_con->KeepConnection=true;
SQL_con->LibraryName=AnsiString("libsqlmy.so");
Par_strs->Add(AnsiString("DriverName=MySQL"));
Par_strs->Add(AnsiString("HostName=localhost"));
Par_strs->Add(AnsiString("Database=val"));
Par_strs->Add(AnsiString("User_Name=root"));
Par_strs->Add(AnsiString("Password=aaa"));
Par_strs->Add(AnsiString("BlobSize=-1"));
Par_strs->Add(AnsiString("ErrorResourceFile=./DbxMySqlErr.msg"));
Par_strs->Add(AnsiString("LocaleCode=0000"));
SQL_con->Params=(TStrings *)Par_strs;
SQL_con->VendorLib=AnsiString("libmysqlclient.a");
SQL_con->Connected=true; // <-- I have EDatabase exception here
Can you help me with finding the source of the problem??
What am I doing wrong?
I am writing console application and I need to connect to DB and get the
data.
Thanks for the help
Andrey
Re: EDatabase exception
Author: Rithban
Date: Tue, 13 May 2003 04:43
Date: Tue, 13 May 2003 04:43
4 lines
1123 bytes
1123 bytes
> SQL_con->Connected=true; // <-- I have EDatabase exception here You'll need to give more details. What is the message associated with the exception?
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads