[Lazarus] SQLDB - Can't attach second SQLite database because transaction
Krzysztof
dibo20 at wp.pl
Mon Jan 7 15:17:02 CET 2013
Ok I found a hack. I created own TMyConnection = class(TSQLite3Connection)
so I have access to protected execsql which don't check transaction:
type
{ TMyConnection }
TMyConnection = class(TSQLite3Connection)
public
procedure ExecSQLNoTrans(const ASql: String);
end;
implementation
procedure TMyConnection.ExecSQLNoTrans(const ASql: String);
begin
execsql(ASql);
end;
And now I can attach my second database by calling:
DBConnection.ExecSQLNoTrans('attach database
'+QuotedStr(GetConfigDir+'second.db')+' as mydb2');
Each system can be broken ;)
Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20130107/01c03a5b/attachment-0003.html>
More information about the Lazarus
mailing list