• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

MS Access

 
Ranch Hand
Posts: 476
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)
 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there any way to fix it, or do I have to re-papulate the whole table?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic