Wrox Programmer Forums
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 9th, 2006, 04:38 AM
Authorized User
Join Date: May 2006
Posts: 49
Thanks: 0
Thanked 0 Times in 0 Posts
Default AutoNumber causes problem.

I have the format of the AN in Access set as: "Br"0000 and "Sr"0000 in another table.

When displaying their ID, I use:
<%="BR" & Right("0000" & myRS("Br_ID"), 4)%>

When using Querystring only Numbers are picked up which is causing me a problem. Can I include the above code in a variable (if so how)?

How do I get around this? Hope to hear...


Old July 10th, 2006, 03:35 PM
Authorized User
Join Date: May 2006
Posts: 49
Thanks: 0
Thanked 0 Times in 0 Posts

Some more code if it helps:

<a href="detail.asp?id=<%= myRS("Br_ID") %>"><%="BR" & Right("0000" & myRS("Br_ID"), 4)%></a>

This QS is in the Bro.asp (inc. file).

Another QS is in the Sro.asp inc file:

<a href="detail.asp?id=<%= myRS("Sr_ID") %>"><%="SR" & Right("0000" & myRS("Sr_ID"), 4)%></a>

How can I pick up the QS in the detail.asp page? The bold parts of the code only submit a number, there is no Br or Sr to differentiate.
Hope this makes sense.

Similar Threads
Thread Thread Starter Forum Replies Last Post
problem Int to Autonumber Irfan_Lateef SQL Server 2000 2 July 9th, 2007 10:57 PM
autonumber problem in Access Pat Crotty Access VBA 2 September 6th, 2006 10:37 AM
Autonumber problem mankoti_mankoti2000 Access 6 August 29th, 2006 12:28 AM
problem inserting a record with autonumber phytos VS.NET 2002/2003 2 January 16th, 2006 07:14 PM
regarding Autonumber... MuthuAL Classic ASP Databases 2 December 8th, 2004 08:04 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.