Autocounter - Reseed counter on Linked Tables SQL Server 2010 (1 Viewer)

Rx_

Nothing In Moderation
Local time
Yesterday, 21:34
Joined
Oct 22, 2009
Messages
2,803
The reseed for a SQL Server linked table (backend) is not the same as the code for an Access backend.

-- TSQL run script to change autocounter to 100000
USE MySQLDBName;
GO
DBCC CHECKIDENT ('Ed_Stormwater', RESEED, 100000);
GO

In my VBA code, the listbox and other variables using counters are often of type int (Integer). With a larger number, they had to be changed to Long. The Overflow error was a dead giveaway.

Why start the autocounter at 100000?
The autocounter is used to assign an ID to a set of permits. On average there should be less than 50,000 permits per year.
Formatting a column in a Listbox to look nice is difficult starting them out at 1. With this number, the formatting of a column will stay consistant in size.

100001
100002
100003 up to
990099
 

Users who are viewing this thread

Top Bottom