Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: PowerBuilder
Expertise: Beginner
Jun 26, 1998

Identity column in SQL server database

Question:
I inserted a new row in a table with Identity column, and saved it by calling update function. Then I immediatly tried to modify this record and update again. The powerbuilder always raises the error "Row changed between retrieve and update," and identity column for that row will have NULL value.

Answer:
Yes, when you perform the first insert you need to get the identity column value and reretrieve the data. The identity column value will be in the transaction SQLReturnData property. Use this value to reretrieve your datawindwo before updating it a second time.

DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date