[fpc-pascal] How to debug when accessing database with sqldb

Adrian Maier adrian.maier at gmail.com
Thu Oct 5 16:04:30 CEST 2006


Hello,

I'm using Sqldb to access a PostgreSQL database.  Is it possible to find out
what sql commands is sqldb generating and trying to execute ?

I have a Lazarus form that contains  a DBgrid which is associated to a table.
After updating a row and executing query.ApplyUpdates  , the program generates
an exception :
"An error occurred while applying the updates in a query: preparation of query
failed. (PostgreSQL: ERROR: syntax error at end of input at character 132). "

Enabling the statement logging in postgres doesn't help in this case, because
the sql command is not recognised at all,  and therefore it doesn't show
up in the log.

Another problem is that deleting rows also doesn't work. I click "delete" on
the TdbNavigator, it asks for confirmation,  but the row is still there.


Cheers,
Adrian Maier


-- 
Adrian Maier



More information about the fpc-pascal mailing list