rs.find error

databases United States
  • 19 years ago

    I get the error rowset does not support scrolling backwards...


    here is my code...


    rs.MoveFirst
    rs.Find "username = 'Adam'"

  • 19 years ago

    Are you not at the beginning of the recordset BEFORE you have a rs.movefirst and maybe you have a static recordset?


    how about filtering the recordset (it works only if you are searching for the record though, not if you are looking for a position in the recordset...)


    rs.filter = "username = 'Adam'"


    and you get it...

  • 19 years ago

    Make sure that you're not opening it as a forward-only recordset.  open it with the adOpenStatic or adOpenDynamic cursor types


    like this:


    Call rs.Open("SELECT * FROM TableName" , cn, adOpenStatic, adLockOptimistic)


    The last parameter can be omitted as the default value would be fine.

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Walking on water and developing software from a specification are easy if both are frozen.” - Edward V Berard