Click to See Complete Forum and Search --> : please help!!!


snoopy22
August 1st, 2003, 05:01 AM
i need to write to my database(dao), i've managed to write only text type by using the function SetFieldValue(), but now i'm trying to write to my primary key(which i defined as an "automatic number"), and i dont have a clue how to do that!
please help...
you probably asks yourselfs why to change an "automatic number", it's automatic!, well... when i add new row in my database it's works fine, but when i delete rows it stays the same, suppose i've deleted row number 3, my data base will look like this:
1
2
4
5
so if you know how to fix it without writing to the field it's even better!

M Owen
August 4th, 2003, 06:57 AM
Try looking up what autonumber means ... If you have a autonumber primary key (or in any other column for that matter) deleting records will leave gaps that cannot be closed. The only way to resequence an autonumber is to delete the table and recreate it and then populate it again. THIS IS IN THE DOCUMENTATION.