Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Questions about SQL Passthrough Cursors and VFP 5.0
Message
De
12/03/1997 14:07:42
Michael Knelsen
Technology Management Corporation
Regina, Saskatchewan, Canada
 
 
À
11/03/1997 23:06:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00023762
Message ID:
00023932
Vues:
21
>>I have a few things not working quiet the way I expected them to, and I was wondering if anyone else had a similar experience. I am using SQL 6.5 - These are the steps that I am following.
>>
>>handle = sqlconnect(..)
>>?sqlexec(handle,'use te') && returns 1
>>?cursorsetprop('fetchasneeded',.t.,0) && returns 1
>>?cursorsetprop('fetchsize',50,0) && returns .t.
>>
>>Now, If I query the database, it returns all of the records to the cursor, not the first 50 record as I requested. So, I added the following line before the query
>>
>>?sqlsetprop(handle,'asynchronous',.t.) && returns .t.
>>
>>Now, in order to get the data back, I have to run the query twice inorder to get the data to come back into the cursor. Am I doing something wrong? I don't think that you would need to run the query twice inorder to get my information. If you have any suggestions, or ideas, it would be greatly appriacated.
>>
>>Mike Knelsen
>
>Use CursorsetProp function to set MAXRECORDS property.
>Read Help CursorSetProp.

I tried this and had the following roblem....if I set MAXRECORDS to 50, it returns only 50 records. Without maxrecords, after the 50th record, it would get the next 50 records. So, is it safe to assume that I needed to do my SQL statement twice for everytime I do a new query to the database, or is there a way around this that will work better??
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform