Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Data of a cursor to be sent to SQL Server as a temp tabl
Message
De
19/08/2006 10:43:35
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Database:
MS SQL Server
Divers
Thread ID:
01146795
Message ID:
01147004
Vues:
42
This message has been marked as a message which has helped to the initial question of the thread.
>Hi Suhas
>
>>inaddition to what dragan said u can also make the temp table updatable through spt and then update it at once rather than sending individual insert commands to the sql server
>
>Can you expand on it, I am pretty new for SQL Server. If you could provide an example code I will adapt it to suit my pruposes.

You create a SPT cursor from that table with sqlexec(h, "select * from #temp", "mycursor"), then cursorsetprop() a bunch of things for that cursor - update tables, primary key, update fields, pretty much the same way VFP does it for the updatable views. Then you fill the cursor and do a tableupdate(). You can find the code here in either downloads or FAQ - look for Vlad Grynchyshyn, he wrote that.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform