On Fr, 2014-03-14 at 12:20 +0100, Petr Hlozek wrote:
> Hi,
> 
> I use TMySQL55Connection, TSQLTransaction and TSQLQuery. I always get
> Transaction is NOT active.
> 
> here is the code:
> 
> procedure TForm1.Button1Click(Sender: TObject);
> var
>   db : TMySQL55Connection;
>   q  : TSQLQuery;
>   tr : TSQLTransaction;
> begin
>   db := TMySQL55Connection.Create(nil);
>   q  := TSQLQuery.Create(nil);
>   tr := TSQLTransaction.Create(nil);
>   try try
>     db.DatabaseName := 'test';

Here you ask for table "test".

> 
> CREATE TABLE test_table (

And here you create a table named "test_table".

Change the table name on creation or ask for the correct name could be
it.

>   id bigint NOT NULL AUTO_INCREMENT PRIMARY KEY,
>   myfield varchar(100) DEFAULT ''
> ) ENGINE='InnoDB' COLLATE 'utf8_bin';

-- 
Marc Santhoff <m.santh...@web.de>


--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to