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'
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 HoodOP
@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.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Active Server Pages Forum.