lotharious
MIS
I am trying to get the autonumber result of a insert statement immediately after I do the statement.
General code
JobInsert.ExecuteNonQuery()
transaction.Commit()
dr = js.ExecuteReader()
jobnumber = dr(0).ToString
The commit does not do the commit fast enough though and my reader returns 0 rows generating an exception.
I have another form that reads the data as well, and if I close the form doing this work fast enough it will not update the other one either.
Ive tried closing the connection and reopening it and a couple other things.
Does anyone know how to go about getting the result more immediate?