473,466 Members | 1,413 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Recordset.RecordCount

pureenhanoi
175 New Member
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
1 3231
cmrhema
375 Contributor
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

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

Similar topics

0
by: Dot Netizen | last post by:
I am having trouble passing an ADODB.Recordset from a VB6 application to a VB.Net class library using COM Interop. I am running this on XP SP2 with the .Net Framework 1.1 and MDAC 2.8 SP1. I've...
0
by: adam | last post by:
I am getting an error when trying to use an ADODB.Recordset that was passed from a VB6 application to a VB.Net class library using COM Interop. I am running this on WinXP SP2 using the .Net...
2
by: ano1optimist | last post by:
I have a form with a search button. I'm using command parameters to pass search criteria to a stored procedure. Here is my code: Stored procedure: CREATE PROCEDURE . @strCriteria varchar(200)...
0
by: CFW | last post by:
I thought this was going to be easy but I'm missing something . . . I need to open an ADODB recordset using the recordset source for a list box on my for. When my form opens, the list box ADODB...
12
by: Mike MacSween | last post by:
rst.eof = true and rst.bof = true or rst.movelast rst.recordcount = 0 ?
2
by: Sunil Korah | last post by:
I am having some trouble with opening recordsets. I have used code more or less straight from the access help. But still I am getting some errors. I am unable to work out what exactly I am doing...
13
by: Jan | last post by:
Hi I have a database that I use to keep track of the sales promotions that we send to companies. I normally send a mailing based on a subset of the companies in the database (found using the...
3
by: ruomingxu | last post by:
I have a problem with recordset/SQL statement. The following is the code. Private Sub Command1_Click() Dim SqlQuery As String Dim RcdSet As Recordset Dim cnt As Integer SqlQuery = "SELECT *...
1
by: anniefs | last post by:
hi help me i m so much stuck int he code and i have no time .... i used ASP VBscipt and javascript functions with MS database javascript function add records in MS DB by using ASP vbscript...
3
ADezii
by: ADezii | last post by:
Last Tip, we demonstrated the technique for retrieving data from a DAO Recordset, and placing it into a 2-dimensional Array using the GetRows() Method. This week, we will cover the same exact Method...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.