Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CursorAdaptor: 100 record limit???
Message
From
10/10/2008 15:30:07
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
10/10/2008 12:06:07
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MySQL
Miscellaneous
Thread ID:
01353968
Message ID:
01354209
Views:
27
>>>I'm testing CursorAdaptors for my MySQL database using an ODBC connection. For some reason, everything works fine until the returned cursor is > 99 records - then I get no cursor at all; I also get no errors and the CursorFill() result is .T. BTW, the ConnectionTimeOut is 600.
>>>
>>>This occurs whether the query is run on the server or a workstation and I've verified the query in the MySQL Query Browser. These are local cursors, so CURSORSETPROP()'s FetchSize and MaxRecords don't apply.
>>>
>>>Anyone have an idea what might be causing this?
>>>
>>>Thanks,
>>>Ken
>>
>>I think the problem is in your cursor's query SQL and base table in mySQL. It looks like you have a query that would work right with the first 99.
>>
>>I use CA against SQL server and I don't have any problems loading even hundreds of thousands records. I would never expect mySQL would have a problem with that.
>>
>>PS: I don't understand what you mean by "These are local cursors, so CURSORSETPROP()'s FetchSize and MaxRecords don't apply.". If they are local cursors then how come you are querying them via mySQL ODBC driver?
>>
>>Cetin
>
>1. VFP's CURSORSETPROP()'s help says, "This property is primarily used for remote views; setting it has no effect on local views." Further, when I try to set them, I get an error: "Property is invalid for table cursors." I think my use of "local" was confusing.
>
>2. When you say my problem is "in the cursor's query SQL and base table", what do you have in mind? I save the complete query to a file just before executing, then I paste that directly into the MySQL Query Browser and it works just fine?
>
>Thanks,
>Ken


1) CursorAdapter have FetchSize and MaxRecords properties and it is not a local cursor. That is why I didn't understand.

2) What I thought was something like a query that doesn't expose the problem in first N records (and those N records should be based on some where expression - another one causes it to surface).

"When it doesn't populate at all there is something wrong in SQL" is one that I observed with CA. There may be other reasons of course. Did you check with aerror()? I would also step in BeforeCursorFill and AfterCursorFill events.

Also try that query that yiu use in query browser with:
DO HOME() + "DataExplorer.app"
And finally maybe you paste the query here so there is a possibility that we can spot something (you use text...endtext already,right?)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform