This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
My table is in Sybase database . I am new to Sybase . I need to generate primary key using PrimaryKeyGenerator function. When I am inserting the data I need to get the primary key back and insert that value in some other table . Is there any API in java which retrieve the primary key at the time of inserting .
couldn't we get the key before actual insertion. we will insert the record ourselves after getting the key.
i mean first get the key from that function and store that key in some local variable of your code. then format the query, pass the same key and insert the record. this way you will have the whole record before insertion, including the primary key.