DOCUMENT:Q150434 01-NOV-2001 [foxpro] TITLE :PRB: Field Width Increases When Use Visual FoxPro ODBC Driver PRODUCT :Microsoft FoxPro PROD/VER::5.0 OPER/SYS: KEYWORDS: ====================================================================== ------------------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual FoxPro for Windows, version 5.0 ------------------------------------------------------------------------------- SYMPTOMS ======== When the Visual FoxPro ODBC driver is used to create a numeric field of width 5 with decimal 2, the driver adds two places to the width in order to ensure that the length is of sufficient size. Two positions are added to compensate for the sign and decimal that is normally included in the length in native Visual FoxPro. CAUSE ===== When a table is created with a numeric field, the decimal point and sign are counted in the width by Visual FoxPro. However, the ODBC standards do not specify how the decimal and sign should be specified when creating a table. STATUS ====== This behavior is by design. MORE INFORMATION ================ Steps to Reproduce Behavior --------------------------- 1. Create a datasource named temp that is set up for free tables and that points to the C:\Temp directory. 2. Run the following program: h=SQLCONNECT("temp","","") ?SQLEXEC(h,"CREATE TABLE ztest (nfield N(5,2))") ?SQLDISCONNECT(h) USE c:\temp\ztest MODIFY STRUCTURE Notice that the width is 7 instead of 5. The width was increased by two. Additional query words: 1.00 VFoxWin ====================================================================== Keywords : Technology : kbVFPsearch kbAudDeveloper kbVFP500 Version : :5.0 Issue type : kbprb ============================================================================= 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. Copyright Microsoft Corporation 2001.