forward only recordset

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 9815402440
    New Member
    • Oct 2007
    • 180

    forward only recordset

    Hi.
    I tried using forward only recordset. I am using VB6. I am using ado and Access 2000. It does not generate any error when I use movePrevious method of recordset.
    Following is the code:
    [CODE=vb]Dim cnn As New ADODB.Connectio n
    Dim rs As New ADODB.Recordset
    With cnn
    .Provider = "MsDataShap e"
    .Properties("Da ta Provider") = "Microsoft.Jet. OLEDB.4.0"
    .Properties("Pe rsist Security Info") = False
    .Properties("Da ta Source") = "e:\data.md b"
    .Properties("Ex tended Properties") = "Jet OLEDB:Database Password= 123"
    .Open
    End With
    rs.Open "select * from Ledgers", cnn, adOpenForwardOn ly
    With rs
    MsgBox .RecordCount 'Displays 67
    .MoveFirst
    .MoveLast
    .MovePrevious 'No errors
    End With[/CODE]
    I was just testing ForwardOnly cursor type. I want to know how it is different from other types.

    regards
    manpreet singh dhillon hoshiarpur
    Last edited by Killer42; Jan 25 '08, 06:19 AM.
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    It might be that forward-only is not supported in your circumstances, and so it opened a "normal" recordset.

    (I don't know, I'm just guessing.)
    Last edited by Killer42; Jan 25 '08, 06:50 AM.

    Comment

    • debasisdas
      Recognized Expert Expert
      • Dec 2006
      • 8119

      #3
      Originally posted by 9815402440
      Hi.
      I tried using forward only recordset. I am using VB6. I am using ado and Access 2000. It does not generate any error when I use movePrevious method of recordset.
      Just change the provider and check it throws error.

      Comment

      • 9815402440
        New Member
        • Oct 2007
        • 180

        #4
        hi debasisdas
        thanks it worked

        manpreet singh dhillon hoshiarpur

        Comment

        Working...