A
A Lonely Programmer
Ok i know that using an access db is a corporate nono but i am not about to
buy sql for anybody (well maybe myself someday) and an approved msde update
must come AFTER i get certain things up and going. With that in mind, i have
a problem and i was wondering if anyone could maybe confirm my hunch.
I have an asp.net app that inserts a form into a db. The user inserts the
info then a parametized query runs updates the db. After the code runs the
db update code it grabs the current identity from the database then
redirects to a display page that allows the user to see the newly inserted
data.
Sometimes, the redirect page displays data not for the record that was just
inserted but rather the one inserted before that. So if i were using
autoincrement for my pk and had just inserted record number 15, the details
page will show record 14 instead. I suspect what is happening is that
somehow the page is getting the @@identity back before the record was
inserted. Is this possible? if so are there work arounds?
thanks steve
buy sql for anybody (well maybe myself someday) and an approved msde update
must come AFTER i get certain things up and going. With that in mind, i have
a problem and i was wondering if anyone could maybe confirm my hunch.
I have an asp.net app that inserts a form into a db. The user inserts the
info then a parametized query runs updates the db. After the code runs the
db update code it grabs the current identity from the database then
redirects to a display page that allows the user to see the newly inserted
data.
Sometimes, the redirect page displays data not for the record that was just
inserted but rather the one inserted before that. So if i were using
autoincrement for my pk and had just inserted record number 15, the details
page will show record 14 instead. I suspect what is happening is that
somehow the page is getting the @@identity back before the record was
inserted. Is this possible? if so are there work arounds?
thanks steve