Page 1 of 1

sqlite, params, insert not working

Posted: 24.04.2014, 13:54
by vbazovic
Enviroment: CodeTyphon 4.9 with Zeos Rev 3112, ver 7.2.0 has a problem (works fine with 7.1.2) with sqlite3 (3.7.16.1 library version) on Linux.

When you try an insert/update query with parameters (ParamByName method) it does not work. This is some debug info:

Exception class: EZSQLException
Message: SQL Error: constraint failed
$0000000000A24A13 line 248 of source/dbc/ZDbcSqLiteUtils.pas
$0000000000A22CDA line 348 of source/dbc/ZDbcSqLiteStatement.pas
$0000000000905463 line 1960 of source/component/ZAbstractRODataset.pas
$0000000000507E09 line 765 of main.pas
$0000000000507938 line 856 of main.pas
$0000000000507258 line 330 of main.pas
$000000000050C79E line 1041 of main.pas
$00000000004F3415
$00000000004F14B5
$00000000004F91CE
$0000000000502A94
$00000000004C5D92 line 18 of ekartonsek.lpr

The only constraint is primary key.

When I drop this constraint I get correct number of rows with all nulls!!! SQL was insert into table with retruning statement (used Open method ).
PK is varchar.

I did try to fix it myself but without success.

Re: sqlite, params, insert not working

Posted: 27.06.2014, 23:16
by EgonHugeist
Could you attach a simple demo, please? just a console app would be sufficient..