Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2006-10

How to debug when accessing database with sqldb

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Adrian Maier

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