Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sqldisconnect
Message
 
 
À
02/11/2004 21:41:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP1
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
00957433
Message ID:
00957872
Vues:
16
You don't want to disconnect and reconected to often because establishing connection with SQL Server is "expensive".

>
>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?
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform