By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 1,384 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

forward only recordset

9815402440
100+
P: 180
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:
Expand|Select|Wrap|Line Numbers
  1. Dim cnn As New ADODB.Connection
  2. Dim rs As New ADODB.Recordset
  3. With cnn
  4.     .Provider = "MsDataShape"
  5.     .Properties("Data Provider") = "Microsoft.Jet.OLEDB.4.0"
  6.     .Properties("Persist Security Info") = False
  7.     .Properties("Data Source") = "e:\data.mdb"
  8.     .Properties("Extended Properties") = "Jet OLEDB:Database Password= 123"
  9.     .Open
  10. End With
  11. rs.Open "select * from Ledgers", cnn, adOpenForwardOnly
  12. With rs
  13.     MsgBox .RecordCount 'Displays 67
  14.     .MoveFirst
  15.     .MoveLast
  16.     .MovePrevious 'No errors
  17. End With
I was just testing ForwardOnly cursor type. I want to know how it is different from other types.

regards
manpreet singh dhillon hoshiarpur
Jan 25 '08 #1
Share this Question
Share on Google+
3 Replies


Expert 5K+
P: 8,434
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.)
Jan 25 '08 #2

debasisdas
Expert 5K+
P: 8,127
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.
Jan 25 '08 #3

9815402440
100+
P: 180
hi debasisdas
thanks it worked

manpreet singh dhillon hoshiarpur
Jan 26 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.