Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Limiting number of records from ADO queries
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Limiting number of records from ADO queries
Miscellaneous
Thread ID:
00190989
Message ID:
00190989
Views:
54
I am using ADO in Visual Basic 6.0 to access FoxPro tables. Is there a way to limit the number of records returned from the query? I have tried using the MaxRecords property to no avail. Some sample VB code is shown below.

Thanks for your help!

' Open connection to data source
loConnection.Open APP_CONNECTION

' Allow "abc" = "a" to be true
loConnection.Execute ("SET ANSI OFF")

' Set maximum records returned (does not work)
loRsToBll.MaxRecords = 200

' Query data source
loRsToBll.Open tcSQL, loConnection, adOpenStatic, adLockReadOnly, adCmdText
Next
Reply
Map
View

Click here to load this message in the networking platform