Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MS Access

 
Alex Kravets
Ranch Hand
Posts: 476
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a strange thing happening in my application that uses MS Access database. I have a page that stores information in a database. The database that I am using was populated by someone else, so I am using it for my servlet. Database has a coulmn called ID which serves as a primary key and has an "Auto Number" property. Here is a problem: every time I INSERT a new data through either SQL or manually, the numbers in ID column do not show up correctly. So if the last row had id 105, the one I insert after it become 110 and then 111,112,113,114 and so on...If I erase all entries after 110, and enter new ones they start with 120,121...and then 130,131...you get the picture.
Why is this happening?
thanks,
Alex
(sorry if question is too long)
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This happens in Sybase also. It is because the DB grabs a block of numbers at a time and then drops whatever isn't used. In Sybase this only happens on a crash.
 
Alex Kravets
Ranch Hand
Posts: 476
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any way to fix it, or do I have to re-papulate the whole table?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic