On Mon, 7 Jan 2013, Krzysztof wrote:

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 ;)

Maybe we should make a method for this in TSQLite3Connection ?

Michael.
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to