PRB: SQL PacketSize Property May Not Work w/Individual Handles

Last reviewed: January 5, 1996
Article ID: Q137536
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, version 3.0

SYMPTOMS

After you use the SQLSETPROP command to change the packet size of an ODBC connection, the SQLGETPROP command for the packet size returns the original value of the packet size. The expected behavior is that SQLGETPROP would return the new packet size as set in the SQLSETPROP command.

CAUSE

This behavior occurs because some drivers and servers do not support changing the packet size on an active connection. In these situations, it is necessary to change the default packet size prior to making each connection. This is discussed in detail in the "Workaround" section of this article.

WORKAROUND

The following workaround precludes setting up ODBC data sources connect1 and connect2. These can be SQL, Oracle, or other ODBC connections.

Use the following commands to set individual packet sizes:

   =SQLSETPROP(0,'packetsize',8192) && 0 means default handle
   handle1=SQLCONNECT('connect1','username','password')
   paksize1=SQLGETPROP(handle1,'packetsize')

NOTE: packsize1 will return 8192

   =SQLSETPROP(0,'packetsize',4096) && 0
   handle2=SQLCONNECT('connect2','username','password')
   paksize2=SQLGETPROP(handle2,'packetsize')

NOTE: packsize2 will return 4096

STATUS

This behavior is by design.

MORE INFORMATION

The following steps illustrate the behavior of ineffective, individual packet size settings:

Steps to Reproduce Behavior

   handle1=SQLCONNECT('connect1','username','password')
   =SQLSETPROP(handle1,'packetsize',8192 &&
   paksize1=SQLGETPROP(handle1,'packetsize')

NOTE: packsize1 will return 4096

   handle2=SQLCONNECT('connect2','username','password')
   =SQLSETPROP(handle2,'packetsize',8192 &&
   paksize2=SQLGETPROP(handle2,'packetsize')

NOTE: packsize2 will return 4096


Additional reference words: 3.00 different each separate single VFoxWin
KBCategory: kbinterop kbprb
KBSubcategory: FxinteropOdbc


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 5, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.