Maybe it cannot be changed after connection is open? Try to change Visual FoxPro default settings at the environment level and than restore it back.
lnPacketSize = Sqlgetprop (0,"packetsize")
= Sqlsetprop (0,"packetsize",8192)
...
= sqlsetprop (0,"packetsize", lnPacketSize)
>Hi All,
>
>I am trying to get better speed out of a query. On my station it takes about 1-2 seconds to retrieve the data from my local test database. But over the network it takes about 40-60 seconds. The query is not very complicated, but I will be retrieving about 400 records for a report. 25 fields from 2 tables with 1 join and 3 conditions.
>
>I tried looking at the:
>
> * Set PacketSize
> nSet=SQLSETPROP(nHandle, "PacketSize", 2048 ) && No # worked here
>
>But this gives an error. ??? I copied the code from the MSDN library.
>
>Any ideas? I am going through the VFP ODBC driver to a VFP database. Using VFP 6 SP5
>
>TIA
>Mike
--sb--