Paul,
More power to you. I'm chicken about things like that but suitable
care should make it safe enouth. Are you making sure that you have
both pre-conversion and post conversion backups when all is said and
done?
--
Mike,
Have you checked and double-checked your assumptions about the use of
the Autonumber datatype? Its only valid use is to provide unique long
integers for use as surrogate Primary Keys. Autonumbers are *not*
guaranteed to be sequential. Autonumbers may go negative and random
while still providing uniqueness. Autonumbers can produce gaps in
numerical sequence due to things as simple as starting a new record
and then abandoning it.
Not everyone agrees with the "only valid use" statement above. They
tend to be folks who spend a lot of time tweddling and tweaking their
Autonumber datatype columns when they behave as they should but not as
the developer wanted. I go further and state that an Autonumber
datatype value should never be seen by anyone but the developer. If
you care what the value of the Autonumber happens to be then you're
mis-using it. Even as a developer, the only reason you would care
would be to assure yourself that parent and child records are related
properly. Microsoft proudly displays Autonumber values on forms in
demo applications. To my mind, that's poor practice.
Most people who miss-use Autonumbers are really trying to create and
manage a *sequence*. The best way to create and manage a sequence is
by using the DMax() function +1 on the field in question. That will
always return a value that is the highest current value in that
field/column the 'plus 1' creates the next number in sequence.. By
retrieving and inserting the new value in the last event before
writing a form's content you'll minimize the potential for a race
condition between multiple users. The beauty of that is that you can
control how your sequence behaves whereas the Autonumber datatype
follows its own, arcane, rules.
I found myself nodding along with some of David's observations and
conclusions for the simple reason that Autonumbers are suitable for
use as Primary Keys and nothing else. While there was no mention of
Primary Key in your thread, the inference has to be that there has
been / is no PK. That means that the schema was flawed at the outset.
Every table should have a primary key.
HTH
--
-Larry-
--
Paul Shapiro said:
I have been distributing backend updates for years via code in the frontend.
I don't have any direct access to most of my clients' backend databases. I
add a custom version property to both the backend and frontend databases,
and also to every table in the backend. Every time the frontend application
is launched, it compares the frontend version number to the backend. If the
backend database is a lower version, the frontend retrieves a list of
backend tables to be modified from a local table in the frontend, a table I
maintain and for which there isn't any client interface. The backend table
version numbers are compared to the required version number. If there are
any backend tables to be modified, the frontend contains the necessary code.
The user is prompted to approve the change, and if so, the code makes the
updates. Once the backend is successfully updated, the frontend sets the
backend table and database version number equal to the present frontend
version number, so future program invocations don't use any significant
resources at startup. It's a few lines of code to compare the 2 db version
numbers. I also display the program version number on the main menu form or
the application caption, so it's easy for me to verify versions when a
client has issues.
This has worked very well for me in small client offices. I don't remember
ever having a problem. The code for performing the backend updates can get
fairly complex, but the only alternative I see is requiring the client to
send me their backend database for manual updating. I look at this as a
reliable form of backend version control. It works especially well when I
have multiple clients using the same application. They don't all need the
same changes at the same time, but it's easy for me to keep the front and
back ends identical. When a client eventually gets an updated frontend, the
backend updates are automatic.