I'm using VS.NET to develop a simple application which
inserts records into a sql 2k server database.
The user inputs the data via an asp.net webform and the
code-behind page handles the execution of the sql.
To create the Insert command I drag-and-dropped a sql
table from the server explorer and updated the insert
command to reflect what i wanted.
The only thing I can't figure out what to do is retrieve
the recordid of the record just inserted.
INSERT INTO newsgroup_threads
The field I am trying to retrieve after insert
is 'threadid' which is a bigint identity field, which
auto created the 'threadid'.
The code I am using to insert the data is:
I would like to retrieve the 'threadid' and store it in
an integer variable for processing in later queries.