Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Complicated select via VfpOleDb
Message
 
 
To
15/04/2010 08:24:16
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01460193
Message ID:
01460253
Views:
40
You can specify different types of recordset returned by provider (KEYSET, FORWARONLY, etc). Some of them always report -1 record count because of there nature.

I'm not sure why you cannot reference recordset fields by name.
What do you get when run following
? oRs.Fields(0).Name
? oRs.Fields(oRs.Fields(0).Name).Value
>The query works now. I had to remove semicolons and linebreaks, and tweak it a bit more, but in the end it worked, even with two levels of subquery, union and all the joins.
>
>The remaining trouble is that the recordset reports having -1 records, and the fields collection doesn't retrieve any fields by name. The first I can ignore, the other can be accessed by number in a loop, and then I get the values and the usual .movefirst/.movenext does hit the .eof eventually. Anyway, the point is that I get a query which works and can be used from Access, which was the request.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform