Change database without disconnecting
Posted: 23.03.2014, 08:03
Hi,
I use Lazarus and FreePascal under Ubuntu 12.04. Because of missing features (transaction support for MySQL) I decided to move to ZeosLib. So far so good but I've found something I don't know what to do.
When I used internal FPC and Lazarus components, I could do something like this:
I tried the same with Zeos TZQuery but it didn't work. Is there any way how to switch to another database without disconnect and connect again, please?
Thank you!
Petr
I use Lazarus and FreePascal under Ubuntu 12.04. Because of missing features (transaction support for MySQL) I decided to move to ZeosLib. So far so good but I've found something I don't know what to do.
When I used internal FPC and Lazarus components, I could do something like this:
Code: Select all
q.SQL.Text := 'use database1';
q.ExecSQL;
q.SQL.Text := 'select aaa from something';
q.Open;
q.SQL.Text := 'use database2';
q.ExecSQL;
q.SQL.Text := 'select aaa from something1';
q.Open;
Thank you!
Petr