paulafernandes
02-07-2003, 11:57 AM
Hi! I told I'd be back... :)
Today's problem is this:
I have in my database (SQL Server 7.0) a table with a field that uses automatic increment. When I add a new record through a ASP form, I need to know the number of the record in which are going to store the data, in order to use that record number in another table.
Now, I'm using "cont = objrecordset.RecordCount + 1", but if a record is deleted, this is going to be wrong, because the "recordcount + 1" is not the number of the record that is going to be used. (I hope this is not so confusing as it seems to me now...)
So, to make it simple, I need to know the number that the database is going to store the data. Is there a way, or I have to do my one increment?
Thank's
Paula
Today's problem is this:
I have in my database (SQL Server 7.0) a table with a field that uses automatic increment. When I add a new record through a ASP form, I need to know the number of the record in which are going to store the data, in order to use that record number in another table.
Now, I'm using "cont = objrecordset.RecordCount + 1", but if a record is deleted, this is going to be wrong, because the "recordcount + 1" is not the number of the record that is going to be used. (I hope this is not so confusing as it seems to me now...)
So, to make it simple, I need to know the number that the database is going to store the data. Is there a way, or I have to do my one increment?
Thank's
Paula