Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sqldisconnect
Message
From
02/11/2004 21:41:02
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
Sqldisconnect
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP1
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
00957433
Message ID:
00957433
Views:
61
Hi all

I'm using VFP8 with MSSQL. I have a batch program that need to update a table with memo field with contents from a text file that I create with SET ALTERNATE. With remote view, the performance with loading cursor with memo fields is very slow.

I;m experimenting using SQL passthru to speed the batch job. I need advice on which of the following is a proper way to perform SQL PT :

Method 1 - Connect and disconnect with each single update
------------
SCAN
.....
......
SQLSTRCONNECT(...)
SQLEXEC(....)
SQLDISCONNECT(...)
ENDSCAN


Method 2 - Connect and do all updates and then disconnect after all updates completed
------------
=SQLSTRCONNECT(...)
SCAN
.....
.....
SQLEXEC
ENDSCAN
SQLDISCONNECT

BTW, when should I used SQLDISCONNECT(nhandle) and SQLDISCONNECT(0)? Does it SQLCONNECT and SQLDISCONNECT private to a datasession and it apply to all datasessions?

Thanks for your advice

Best Regards
Next
Reply
Map
View

Click here to load this message in the networking platform