|
 |
asp_databases thread: Advice on refreshing info needed
Message #1 by "David" <davidwebb71@h...> on Tue, 22 Aug 2000 12:23:15
|
|
Hi there
I've got 2 forms 1 to enter data and the other to submit that data to a
table. This works fine.
I also want to display on the second page the data submitted and also the
Log ID - an autonumber primary key. I expected to be able to just do
something similar to the following:
objRS.MoveLast
Response.Write objRS("Log ID") &" " & objRS("Error Description")
However, this brings up the last record but one. If I try to be cunning and
add:
objRS.MoveNext
I get an exception error.
I figure that I need to put a Refresh command in there somewhere. Is this
correct, if so how do I do this??
Any help would be a godsend.
Thanks
Dave
Message #2 by "Dana Coffey" <dcoffey@x...> on Tue, 22 Aug 2000 09:29:37 -0400
|
|
once I ran into this problem, and I found I needed to set the cursor type to
"dynamic" as oppesed to "static".
It may be worth a shot-
Dana Coffey
Technologist, Xceed, Inc.
112 Krog St. Atlanta, GA 30307
tel. xxx-xxx-xxxx x 5013
www.xceed.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Everything should be as simple as it is, but not simpler.
----Albert Einstein
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
{{-----Original Message-----
{{From: David
{{Sent: Tuesday, August 22, 2000 12:23 PM
{{To: ASP Databases
{{Subject: [asp_databases] Advice on refreshing info needed
{{
{{
{{Hi there
{{
{{I've got 2 forms 1 to enter data and the other to submit that data to a
{{table. This works fine.
{{
{{I also want to display on the second page the data submitted and also the
{{Log ID - an autonumber primary key. I expected to be able to just do
{{something similar to the following:
{{
{{objRS.MoveLast
{{Response.Write objRS("Log ID") &" " & objRS("Error Description")
{{
{{However, this brings up the last record but one. If I try to be
{{cunning and
{{add:
{{
{{objRS.MoveNext
{{
{{I get an exception error.
{{
{{I figure that I need to put a Refresh command in there somewhere. Is this
{{correct, if so how do I do this??
{{
{{Any help would be a godsend.
{{
{{Thanks
{{
{{Dave
{{
Message #3 by "David" <davidwebb71@h...> on Tue, 22 Aug 2000 15:27:27
|
|
Hi there,
I did try to change the cursor to adOpenDynamic but it came up with the
same problems as before.
I can get around the problem by redirecting to another web page and then
running the query.
It would be nice though not to have to go from a to b via c!!
Message #4 by "Ken Schaefer" <ken@a...> on Wed, 23 Aug 2000 11:02:30 +1000
|
|
David,
Are you using Access?
http://www.adopenstatic.com/Experiments/autonumberandaddnew.asp
http://www.adopenstatic.com/Experiments/fastestautonumber.asp
No .refresh required.
You can keep the adOpenForwardOnly cursor.
You're probably missing .Update (see code on the two pages above, the second
is probably faster)
Cheers
Ken
----- Original Message -----
From: "David"
To: "ASP Databases" <asp_databases@p...>
Sent: Tuesday, August 22, 2000 12:23 PM
Subject: [asp_databases] Advice on refreshing info needed
> Hi there
>
> I've got 2 forms 1 to enter data and the other to submit that data to a
> table. This works fine.
>
> I also want to display on the second page the data submitted and also the
> Log ID - an autonumber primary key. I expected to be able to just do
> something similar to the following:
>
> objRS.MoveLast
> Response.Write objRS("Log ID") &" " & objRS("Error Description")
>
> However, this brings up the last record but one. If I try to be cunning
and
> add:
>
> objRS.MoveNext
>
> I get an exception error.
>
> I figure that I need to put a Refresh command in there somewhere. Is this
> correct, if so how do I do this??
>
> Any help would be a godsend.
>
> Thanks
>
> Dave
|
|
 |