I've got a problem updating a new record:
(all SQL was generated using the SDAC component's 'Generate SQL' option)
1. Insert a record in a table (the table has an identity field for the primary key)
2. call qry.post
3. call qry.edit
4. change some fieldvalues
5. call qry.post
at step 5. I get an error indicating that the primary key value is not known, I left all options/properties at their default values. Stopping the program after step 2. and restarting it makes the problem go away (not really an option).
Using Delphi 7 Pro, SDAC 3.55.0.16. MSDE 2000 SP4, Windows XP
Am I doing something wrong or is there a problem in the SDAC components?
regards,
Martin
Simple question (I hope)
I solved it for now by adding:Ikar wrote:Most likely the problem is in incorrect generated SQLInsert, SQLUpdate.
Try to clear these properties at all.
2a. qry.close
2b. qry.open
this way the data is forced to the database.
The SQL was generated by the SDAC component if that is any clue.
regards,
Martin