Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: addnew then cannot access the last record on the same web page


Message #1 by "Steve Malling" <shm@b...> on Thu, 9 Aug 2001 19:02:51
I have successfully managed to add new records to my database from a web 

page. When I open a recordset further down the ASP web page, I cannot read 

the record that was produced by the addnew method further up the page. I 

can access it later when I add another item but this item is then not in 

the recordset generated on the same page. Any idea what is going on?
Message #2 by "Joe Bennett" <joe@a...> on Sun, 12 Aug 2001 17:07:39
> I have successfully managed to add new records to my database from a web 

> page. When I open a recordset further down the ASP web page, I cannot 

read 

> the record that was produced by the addnew method further up the page. I 

> can access it later when I add another item but this item is then not in 

> the recordset generated on the same page. Any idea what is going on?



What does your connection look like (what cursor/lock types are you using)?
Message #3 by <shm@b...> on Mon, 13 Aug 2001 10:24:19 +0100
Hi Joe,



thanks for your response. In the end I decided that after I had updated and

closed the recordset, the page parsed too quickly for the next piece of

coding to pick up the entry that was being made to the data base. It always

missed the record being updated yet found it next time through.



I don't know if there is a correct way around this...I decided to keep the

recordset open and access it that way. I suspect as the update was already

in the recordset I was able to access it.



In case you have a solution: I was using adopenkeyset and adlockoptimistic.

I was happy to get the autonumber ID of the new record but once I updated

the record I could not get its details later in the page.



Steve



----- Original Message -----

From: "Joe Bennett" <joe@a...>

To: "Access ASP" <access_asp@p...>

Sent: Sunday, August 12, 2001 5:07 PM

Subject: [access_asp] Re: addnew then cannot access the last record on the

same web page





> > I have successfully managed to add new records to my database from a web

> > page. When I open a recordset further down the ASP web page, I cannot

> read

> > the record that was produced by the addnew method further up the page. I

> > can access it later when I add another item but this item is then not in

> > the recordset generated on the same page. Any idea what is going on?

>

> What does your connection look like (what cursor/lock types are you

using)?

>




  Return to Index