PACS
asked on
AutoIncrement Access from BDE
Greetings,
We have an autoincrement field in a file (BDE/PARADOX) that has been set to a low value (how, is unknown at the moment). We would like to be able to rewrite the header of the file so that the autoincrement field is set to a non-duplicate (proper) value again. The code to get the largest existing value is a piece of cake. The challenge is to rewrite the header with this value. Anyone have any ideas? The goal would be to write code to do this (rewrite the header). We can not rewrite the file out since the autoincrement fields would be renumbered (other files need the existing numbers).
Thanks in advance....
John Wilson
Senior Software Engineer
PACS Software, Inc.
jwilson@pacsusa.com
We have an autoincrement field in a file (BDE/PARADOX) that has been set to a low value (how, is unknown at the moment). We would like to be able to rewrite the header of the file so that the autoincrement field is set to a non-duplicate (proper) value again. The code to get the largest existing value is a piece of cake. The challenge is to rewrite the header with this value. Anyone have any ideas? The goal would be to write code to do this (rewrite the header). We can not rewrite the file out since the autoincrement fields would be renumbered (other files need the existing numbers).
Thanks in advance....
John Wilson
Senior Software Engineer
PACS Software, Inc.
jwilson@pacsusa.com
John,
Just a suggestion - refrain from using Autoincrement fields as keys. If your table gets corrupted and you need to rebuild it, getting the BDE to use exactly the same values for the AI fields is very difficult.
Just a suggestion - refrain from using Autoincrement fields as keys. If your table gets corrupted and you need to rebuild it, getting the BDE to use exactly the same values for the AI fields is very difficult.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER