Problem with MovePrevious() in ASP

I am trying to get MovePrevious() to work in an ASP page...  here is the code that I am using...

sqltxt = "select * from customer"
Set Con = Server.CreateObject("ADODB.Connection")
Con.Open "DSN=Pets;UID=;PWD=;DATABASE=Pets"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.CursorType = adOpenStatic
rs.open sqltxt, con

... then when I try to go to use MovePrevious(), the page stopps running and says that an "Exception occurred" on the line with the MovePrevious() command (rs.MovePrevious()) to be exact.

Any thoughts?

Thanks!
maysbAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

thomasdoddsCommented:
1 - try checking for BOF before executing the Move Previous:

If objRecordset.BOF = True
...
End If

2 - rs.CursorType = adOpenStatic was used - I assume you have included the adovbs.inc file, if not use the parameter value instead:

objRecordset.Open strSQL, strConnection, 3
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
e-DiddyCommented:
..also try this before the execute if thomas suggestions did not fix.

rs.CusrorLocation = adUseClient,

I have had weird problems before with Static Server side cursors.(default)
0
MindphaserCommented:
maysb

You asked to split points between e-Diddy and thomasdodds.
I have reduced the points on this question from 100 to 50 as indicated by your request at Community Support. Please copy the URL and create a new question in this topic area for the other Experts to whom you wish to award points. The title of the question should read "Points for", followed by the Expert's name. In the question itself, you should paste the link to the original question and perhaps a comment stating that the points are for their help with that question. Once you have created the new questions, you can go back to the original, and accept the comment from the Expert for whom you did not create a new question. The Experts will  comment in your new "Points for" question(s), which you then accept and grade to close.
If you have any questions, please don't hesitate to ask.
Thank you.

** Mindphaser - Community Support Moderator **
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

maysbAuthor Commented:
Thanks guys.  Unfortunatly, it was my inability to code that was the problem... not any of this stuff.  Since you were both kind enough to look into this, I will split the points.  ThomasDodds, I am going to give you 50 points for answering and e-Diddy, follow this link

http://www.experts-exchange.com/Web/Q_20528711.html

and submit an answer for your 50 points.

Thanks again.
0
maysbAuthor Commented:
Thanks again!
0
thomasdoddsCommented:
no problem - sometimes I need the extra eyes too!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.