Computer Learning Zone CLZ Access Excel Word Windows

If you removed all the arteries, veins, & capillaries from a person's body, and tied them end-to-end... the person will die.

-Neil deGrasse Tyson
 
Home   Courses   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > Forums > ASP
Back to Active Server Pages Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Record sets
Joe Hood 
      
3 years ago
Hello Richard,
Hope all is well my Friend!
I am trying to open a record set, move to the last record, display the ID. Ultimately, I want to add one to it for a new record. For some reason rs.movelast generates the following error message if I ask it to response.write rs("ID").

Microsoft OLE DB Provider for SQL Server error '80040e24'

Rowset does not support fetching backward.

/OCPServicePlus/Add-Customer.asp, line 31

Can you tell me what I am doing wrong?

Thanks-Joe
Alex Hedley  @Reply  
           
3 years ago
Why do you need to add 1 to it?
Is the ID not a AutoNumber?
Wouldn't it just get created when you save?
Joe Hood OP  @Reply  
      
3 years ago
Hi Alex,

My apology, this is the customer number field [CN], unfortunately it is not an auto number. I am working with tables set up in the 1980's for some reason they don't use the [Counter] Field, which is an auto number, in the relationship between the work order table and the customer table. They use the [CN] and [IN] fields  both are generated by the software when a work order is created. Neither are auto-numbers. Sort of strange set up, but we are stuck with it for now. It is usually not a problem. In access I have no issues duplicating their code and creating work orders or whatever. On the web with CLassic ASP I am struggling with populating the [CN] field with a new number. I simply need to find the last number generated and add 1 to it for the new Customer Number.

Thanks,
Joe
Alex Hedley  @Reply  
           
3 years ago
I'd create a DMAX function in ASP that gets the largest current number, plus one, then are that to your field.
Alex Hedley  @Reply  
           
3 years ago
Code Vault: ASP DMAX / DMIN
Joe Hood OP  @Reply  
      
3 years ago
Hello Alex,

Thank you very much for the information. These functions are exactly what I was looking for. Never even thought to look there.

Have a Great Day!

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Active Server Pages Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 1/23/2026 6:52:39 AM. PLT: 1s