Print Page | Close Window

How to make a follow up number

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=4622
Printed Date: 30 March 2026 at 10:06am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: How to make a follow up number
Posted By: sierra
Subject: How to make a follow up number
Date Posted: 30 July 2003 at 11:55am
I am trying to make the following work in ASP in combination with SQL

A00001, A00002, ..... A99999, B00001, B00002,
.....B99999, C00001

It has to be an unique number....

I have come this far...

<!-- #Include FILE="../connections/conn_????.asp"--><%
Set rs = server.CreateObject ("ADODB.recordset")

SQL = "Select max(volgnummer)as volgnummer from Formteller"
set rs = conn.Execute(SQL)
volgnummer = rs("volgnummer")+ 1

SQL = "UPDATE Formteller SET volgnummer=" & volgnummer
set rs = conn.Execute(SQL)



Can someone please help me
Sorry for the bad English



Replies:
Posted By: sierra
Date Posted: 30 July 2003 at 4:01pm
HELP please


Posted By: b_bonnett
Date Posted: 31 July 2003 at 2:57am

The easiest solution is to set the 'volgnummer' field to an autonumber type. This will generate a new and unique number for each new record entered into the database.

Blair



-------------
Webmaster, http://www.planegallery.net/ - The Plane Gallery
Greetings From Christchurch



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net