im working on a database that deals with autoincremented order numbers and stuff like that.
so say i do an insert into an order, and i put in all of the proper values, and then the database automatically creates the order number.
right after i do this, say right after the @, i do another query where i retrieve the order number that the database just assigned to said order. is there some kind of delay that i should put in to give the database time to update itself with the insert that i just did.
the reason i ask is that im doing an insert, and then the select right after, and sometimes i get null or 0 values for my data, kind of like i havent waited long enough for the database to update itself.
is there something i should do?
thanks ahead of time