[quoted text, click to view] "Paul" <anonymous@discussions.microsoft.com> wrote in message
news:68D7662C-5B5A-4F27-87FA-C2ED1DC43BFE@microsoft.com...
> Hi:
>
> We recently upgraded an Access XP database to SQL Server, but continue to
use an Access MDB as the front end (more mods need to be done to migrate the
front end to an Access Project). In the original Access database, several
tables use an Access AutoNumber data type as a primary key. At one point in
time, the Access database was converted to a replicated database. Following
the conversion, the AutoNumber fields no longer create new values by adding
1 to the previous value; they now use a random number generator. (We
converted the database back to a non-replicated format several months prior
to converting to SQL Server.)
[quoted text, click to view] >
> When we converted to SQL, the AutoNumber fields were converted to IDENTITY
data type. With a new record, SQL adds to the highest value for a new
Identity field value. We've been having a number of "ODBC Time Out", and
"Failed insert on linked table" errors when adding records, (the "link fail"
errors occur even when the Access form being used to add the new record is
based on a single table).
[quoted text, click to view] >
> One of the things we've discovered is that some of the random numbers
generated by Access during its "replicated" phase are fairly close to the
maximum values allowed for the Access AutoNumber data type. (FYI, the
Access AutoNumber is a "long integer" data type; more or less equivalent to
a SQL Server "int" data type.) One of the tables with frequent problems
only has about 25,000 records, but some of its records have primary key
values that hover near the limit of the "long int" data type. This has
resulted in huge gaps in the numeric values in the new Identity field
values. I've tried everything I could find to see if I could force SQL
Server to start new Identity field values in some of the lower value gaps,
i.e., I tried seeding the Identity field at 27,000, and adding 1 for new
records. However, it doesn't work.
[quoted text, click to view] >
> Is there any way to force SQL Identity values on a table that already has
records in it? (It would be OK if we were creating a new table, but we've
got thousands of related records to these problematic tables so it'd be a
bit tricky to create new Identity field values...although we will probably
do this at some point in time.)
[quoted text, click to view] >
> Any help would be really appreciated. If what I wrote makes no sense, I'm
not surprised. I've been working for 16 hours and I'm burnt.
>
> THANKS!
> Paul
See if DBCC CHECKIDENT will help you. You can find the syntax using a
search engine.
Glenn