Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Tracking how many records currently fetched (asynchronou
Message
From
08/10/2005 11:50:51
 
 
To
08/10/2005 04:27:36
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Client/server
Environment versions
Visual FoxPro:
VFP 9
Database:
MS SQL Server
Miscellaneous
Thread ID:
01057402
Message ID:
01057460
Views:
11
CursorGetProp('RecordsFetched', 'myAlias')
Many thanks to Cetin and Fabian for this answer. It seems so simple, but I've searched high and low for an answer to this, and even a FAQ on this site only suggested keeping a track by setting how many records get fetched at each pass and keeping count yourself.



> If it's very large table then why are you using:
SQLExec(hConn, "select count(*) AS rcount from verylargefile","rcount")
> That info is readily available in sysindexes.ie:
SQLExec(hConn, "select rowcnt from sysindexes"+;
 " where id=object_id('verylargefile') and indid<2",'rcount')
nTotalRecordsToFetch=rcount.rowcnt
Well, I guess I know virtually nothing about SQL Server - I'm just beginning. My version seems to work reasonably fast. Could you tell me what the benefit is of your version?


Now a follow-up question:

I've added this line at the top of the code. This is to close the cursor that I will load the data into, if it already exists.
USE IN SELECT("getreg")
Now if I run the code, then first time, it works. If I cancel it (press ESC), and then run it again, I get an error on this line of code:

Connectivity Error: [Microsoft][ODBS Driver Manager] Function sequence error

I cancel this and try again (run 3), and it works normally. Run 4 then fails in the same way.

What is happening here, and how do I prevent it?

thanks
Ben
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform