Print Page | Close Window

Adding autonumber in new record

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=729
Printed Date: 28 March 2026 at 11:59pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Adding autonumber in new record
Posted By: judo2000
Subject: Adding autonumber in new record
Date Posted: 04 March 2003 at 2:42pm

I have a database for employees with different venues.  In the Employees table I have empID which is an auto number. empID is in all of the venue tables as well.  I have created a form that allows venue managers to see all the employees in the database whose venue ID matches their venue.  From this page then can add these employees to the venue schedule page, but I cannot add the record to the venue table in the DB because the only way I seem to be able to read the empID into the form is with:

<input type="text" name="empID" value="<%=rsSchedules("empID")">

But of course the empID is not text so when the add_emp.asp pages tries to add the new record to the venue table I get a type mismatch error.

Is there an easier way to either call the empID into the form (I don't care if the venue manager sees the ID or not) or to convert it into the proper form so it can be added to the table?

I appreciate any help.



-------------
If you are not willing to work hard to realize your dreams, why bother dreaming?



Replies:
Posted By: Scott07
Date Posted: 05 March 2003 at 9:45am
just use clng(rsSchedules("empID"))


Posted By: judo2000
Date Posted: 06 March 2003 at 12:46pm

Thanks I tried that and it worked, sort of.  I writes to the database now but it puts a 0 for the empID and increments the autonumber jbaID but everything else is left blank.  Any ideas?

Thanks,



-------------
If you are not willing to work hard to realize your dreams, why bother dreaming?



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