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.
I have table named remitter with primary key column as remitterId. The last entry in the table was with the remitterId as 6988(approx). On generation of the new remitter from the application it starts entering the row with remitterId as 500000000006877, which is a long digit and so application throws NumberformatException. While digging more in to it I found that generator class is native.
I have two questions here:
1. Why all of sudden this behaviour aroused?
2. how can I add the entries in the table once again to normal four digit?
I mean do i have to restart the application server or should make any changes in the database?
you should check your sequence generator (Oracle) or run DBCC on MS SQL / MySql servers to find out what is the next PK value.. the problem should be there as your generator class is set to native (meaning that the db will take care of the id assignment).
Joined: Oct 28, 2009
Can you give the solution for the Sybase database. I am able to trace the sysindexed table and when searched with the primaryKey (pkREMIITER) of Remitter table, found the following result
id = 2029218548
and status = 2050
Dont know what to do with these details. Will changing any of the columns in sysindexes table help ?