This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes MS Access Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "MS Access" Watch "MS Access" New topic
Author

MS Access

Alex Kravets
Ranch Hand

Joined: Jan 24, 2001
Posts: 476
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)


All right brain, you don't like me and I don't like you, but let's just do this one thing so I can get back to killing you with beer.<br /> <br />- Homer Simpson
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
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.


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Alex Kravets
Ranch Hand

Joined: Jan 24, 2001
Posts: 476
Is there any way to fix it, or do I have to re-papulate the whole table?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: MS Access
 
Similar Threads
Store byte[] array in MS Access - Help!
Urgent !! why ? no suitable driver ???
[Hibernate] Please explain hilo generator
SQLException. Generel Error
hi urgent