Can you explain a little bit what do you mean with "expensive", some URLs will be fine (UT messages will be ok too)...
TIA.
>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
>
>By the way, when should I used SQLDISCONNECT(nhandle) and SQLDISCONNECT(0)? Does it SQLCONNECT and SQLDISCONNECT private to a datasession and it apply to all datasessions?
>