Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLExec() returns a maximum of 100 rows
Message
From
11/04/2005 04:46:35
 
 
To
07/04/2005 20:45:35
James Chan
Objectmastery Pty Ltd
Hawthorn, Australia
General information
Forum:
Visual FoxPro
Category:
Client/server
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01002489
Message ID:
01003310
Views:
21
This message has been marked as a message which has helped to the initial question of the thread.
Hi,

There is a set of CURSORSETPROP() commands which can be executed to force the behavior. In your case is
CursorSetProp("FetchSize",-1,0)
CursorSetProp() function may look as a vicious circle at first glance. One need to set the cursor property before getting the cursor through SQLExec(). General synthax of CursorSetProp() is
CURSORSETPROP( cProperty [, eExpression] [,cTableAlias | nWorkArea])
If you try to set the property of an inexisting cursor, an error is generated. The trick is to use 0 as nWorkArea. If the function sets the property of work area 0 (which actually does not exist), all future cursors will "inherit" this value. In other words, set the property once and it becomes default. The same trick is true for SQLSetProp(), when you don't have a connection handle yet.

Hope this helps,

>When I issue the following SQLExec(), I got a maximum of 100 rows in MyCursor. What do I need to do to retrieve all rows to MyCursor?
>
>SQLResult = sqlexec(h, "select * from MySQLTable", "MyCursor")
>do while SQLResult == 0
>  SQLResult = sqlexec(h)
>enddo
>
>
>Thanks
Grigore Dolghin
Class Software.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform