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

Recordset.RecordCount

pureenhanoi
100+
P: 175
I'm using VB6 and MSAcces DataBase
my project have one Conection called: GPcnxn, a Recordset called: GPrs.
If i connect to database by DataEnvironment, so, after this command
Set Gprs=Gpcnx.excute("..."), i can get: Gprs.RecordCount, Gprs.AbsolutePossition
If i connect to database by DNS, so, after that command, both GPrs.RecordCount and GPrs.AbsolutePossition are return -1
i'll tried using : gprs.open sqlQuery,Gpcnxn,1,3. So, Gprs.RecordCount returns a valid value, but Gprs.AbsolutePossition still returns -1.
Please give me resolutions
Mar 27 '07 #1
Share this Question
Share on Google+
1 Reply


100+
P: 375
I'm using VB6 and MSAcces DataBase
my project have one Conection called: GPcnxn, a Recordset called: GPrs.
If i connect to database by DataEnvironment, so, after this command
Set Gprs=Gpcnx.excute("..."), i can get: Gprs.RecordCount, Gprs.AbsolutePossition
If i connect to database by DNS, so, after that command, both GPrs.RecordCount and GPrs.AbsolutePossition are return -1
i'll tried using : gprs.open sqlQuery,Gpcnxn,1,3. So, Gprs.RecordCount returns a valid value, but Gprs.AbsolutePossition still returns -1.
Please give me resolutions
Try the cursor type as dynamic or keyset. if you are using cursor type as adopendyanmic set the cursor location as aduseclient. In keyset even if you do not mention the cursor location it will show(at least it worked for me). Or try cursor location=3
NOTE: I did not use DNS
Mar 27 '07 #2

Post your reply

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