Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data of a cursor to be sent to SQL Server as a temp tabl
Message
From
20/08/2006 01:19:11
Suhas Hegde
Dental Surgeon
Sirsi, India
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
Database:
MS SQL Server
Miscellaneous
Thread ID:
01146795
Message ID:
01147070
Views:
42
This message has been marked as the solution 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.
>
>Thanks for your response.

it would be something like
sqlexec(han,"create table #temp")
sqlexec(han,"select * from #temp","temp")

*make the temp updatable to the server
cursorsetprop(tables,....
cursorsetprop(updatefieldlist,....
*etc

insert into temp values(...)

tableupdate(.t.,.t.,'temp')

sqlexec(han,'select * from originaltable where pk=#temp.pk....
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform