[Lazarus] Need some help with UpdateSQL in TSQLQuery and TMySQL50Connection
Joost van der Sluis
joost at cnoc.nl
Tue May 27 00:04:57 CEST 2008
Op maandag 26-05-2008 om 16:47 uur [tijdzone -0500], schreef Howard Lee
Harkness:
> Ok, if I run this as-is, I get some interesting errors. First thing I
> noticed is that when I click on "add" in the DBNavigator, the
> auto-increment field is not added properly; it's left blank.
That's normal. TSQLQuery caches everything. In fact the record isn't
made yet, only in memory. So MySQL didn't generate a number yet.
> Next, when I exit the program, I get a mysterious error message that
> tells me that I attempted to use a type name as an expression, as
> reported by procedure DatabaseError in unit db. I get a database error
> from just loading the program into Lazarus, and then closing Lazarus.
Can you give the literal error-message?
btw: you can use the same transaction for the query and the connection.
Especially with MySQL, where the transaction-code only contains empty
stubs.
Joost.
More information about the Lazarus
mailing list