Paul,
I'm not sure but I think VFP addes one position for sign and another for a '.'. Neither one requires extra space in SQL Server.
>All:
>
>Can someone tell me why the precision of a SQL Server numeric/decimal data type will always be two larger in a SPT results cursor in VFP?
>
>For example going to the SQL Server pubs!discounts table:
>
>
>LOCAL hConn, cConnectStr, nResult
>
>hConn = 0
>cConnectStr = "DRIVER=SQL SERVER;SERVER=(local);UID=SA;PWD=;DATABASE=pubs"
>
>hConn = SQLSTRINGCONNECT(m.cConnectStr)
>
>IF hConn > 0
> nResult = SQLEXEC(m.hConn,"SELECT * FROM discounts")
> IF nResult > 0
> CLEAR
> DISPLAY STRU
> ENDIF
> =SQLDISCONNECT(hConn)
>ELSE
> = MESSAGEBOX("Connect Failed!")
>ENDIF
>
>
>The DISCOUNT field is defined as precision = 4 and scale = 2 in SQL Server. However, in the sqlresults cursor the DISCOUNT field has width = 6 and dec = 2.
>
>--Paul
--sb--