Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Keeping cursor on server
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00697286
Message ID:
00697290
Vues:
15
This message has been marked as the solution to the initial question of the thread.
Hi Tom,

In MS SQL Server you cannot create cursor but you can create temp table.
-- pubs DB
lcSQL = "SELECT * INTO #temp FROM authors WHERE state = 'CA'"
? SqlExec(lnConn, lcSQL)
? SqlExec(lnConn, [SELECT * FROM #temp])
...
? SqlExec(lnConn, [DROP TABLE #temp])
Another way to acomplish the same result is to use first select as derived table in the second select.

>This ia a question for both SQL server and Oracle. I'm testing with SQL server first, but I eventually need to offer both options.
>
>I have a situation where I create remote cursor with SQLexec(). Then I need to create a second cursor with a join of some other table to the first cursor.
>
>Of course, my first cursor is now on my machine, not the server, so I can't ask an SQLexec to join something to it. But, I thought, maybe there is a way to tell SQL server to keep the cursor on the server (as well as sending it to me), for reuse in the next SQLexec() statement. Anyone know how?
>
>TIA. Tom
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform