Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQLEXEC and retrieving multipe record sets
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00661239
Message ID:
00662148
Vues:
31
Dear Sergey:

Yes, I agree. Could you look at my response to Claudio about the way SQL returns the cursors.

Thanks for the help,

Jim Smith
>You can use USE ... AGAIN command to reopen cursors with the names you want.
>
>>Thanks Mark,
>>
>>Yes, the naming of the 3rd parameter certainly gives an interesting result. If you leave it blank you get the result cursor named SQLResult, SQLResult1, .... SQLResultn. But, this seems to be problematic because SQL server may or may not return the cursor in the same order of the calling procedure order.
>>
>>This seems like a great feature that saves connecting and executing multiple SQLEXECs to retreive multiple record sets. I guess I am not sure how to resolve the issue of the returned cursors' naming convention.
>>
>>Regards and thanks,
>>
>>Jim Smith
>>
>>This seems like a great way to populate a
>>>Pass the cursor name as the 3 parameter in your SQLExec(). However, each subsequent cursor should be that name followed by a number.
>>>
>>>>Using SQLEXEC how do I individually name the cursors that are returned in a multi record set query? I issue a statement such as:
>>>>
>>>>lcSQL = "Select * from customers;select * from employees"
>>>>lnResults = SQLEXEC(1,lcSQL)
>>>>
>>>>When I issue this command I get back SQLRESULT1 and SQLRESULT.
>>>>
>>>>If I issue the command again as:
>>>>
>>>>lnResults = SQLEXEC(1,lcSQL,"Employees")
>>>>
>>>>I get back Employees1 and Employees
>>>>
>>>>The syntax does not seem to support something like:
>>>>"SELECT * FROM Customers,'Customers';Select * from Employees,'Employees'"
>>>>
>>>>I also tried it directly:
>>>>
>>>>lnresult = SQLEXEC(1,select * from customers,"customers";select * from employees,"employees")
>>>>
>>>>No luck. Any ideas would be greatly appreciated.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform