[Lazarus] Error with TSQLite3Dataset?

luiz americo pereira camara luizmed at oi.com.br
Tue Aug 6 00:09:40 CEST 2013

Try ExecSQL

What is in "auxstr"?

What is your Table definition?

Since you are updating data using direct SQL, you will need to close
and re open the dataset so the dataset record is in sync


2013/8/5 "Arí Ricardo Ody" <aro52 at gmx.com>:
> I use ExecuteDirect method to insert a record in a SQLite3 SQL tabel. The
> primary key is a sequential integer number. I have the follwoind contruction
> in the moment I will execute the SQL Insert command:
>     try
>       cdsInventario.ExecuteDirect(auxstr);
>     except
>       On e:Exception do
>          begin;
>            ShowMessageMobile(Self,'Error INSERT Item = ' + e.Message);
>            Exit;
>          end;
>     end;
> I discover that when the PK value is equal to the last(at least) sequential
> number recorded in the SQL tabel the command Insert does nothing and the
> except clause is not executed(I'm sure of this). Late I change the logic to
> ensure that the value given to the PK in the Insert differ from any one in
> the dataset and then everything's fine.
> Do somebody have comments?
> Greeting from São Paulo - Brasil
> Ricardo
> P.S.: The problem occurs with Lazarus 0.9.30 since the last Lazarus version
> the clear screen for windows CE version is in error.
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

More information about the Lazarus mailing list