Board index » delphi » Work with autoincrement key field.

Work with autoincrement key field.

I have autoincrement  key field in Paradox table.  And use TQuery with
CachedUpdates=True  and TUpdateSQL.
Problem:
I am not see value of key field in new row. How can i work with this row?

Andrey.

 

Re:Work with autoincrement key field.


The autoincrement value is not assigned until the record is actually written
to the table when you call ApplyUpdates. Run the query again after applying
updates to see the new value.

As you can see, cached updates and autoincrement fields do not work well
together.

Bill

--
Bill Todd
(Sorry but TeamB cannot answer questions received via email)
(Remove nospam from my email address to contact me for any other reason)

Re:Work with autoincrement key field.


Quote
>I have autoincrement  key field in Paradox table.  And use TQuery with
>CachedUpdates=True  and TUpdateSQL.
>Problem:
>I am not see value of key field in new row. How can i work with this row?

Close and reopen the query

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:Work with autoincrement key field.


Thank you!

I am know about reopen, but this is lengthy.
Can I receive one or few necessary records, not all from query.

Andrey

Quote
>The autoincrement value is not assigned until the record is actually
written
>to the table when you call ApplyUpdates. Run the query again after applying
>updates to see the new value.

>As you can see, cached updates and autoincrement fields do not work well
>together.

>Bill

>--
>Bill Todd

Other Threads