I would use CAST in your SQL to make sure you get back the precision you want. You still may need a SET DECIMALS setting and maybe try SET FIXED OFF instead of ON.
-- rk -----Original Message----- From: profoxtech-boun...@leafe.com [mailto:profoxtech-boun...@leafe.com] On Behalf Of Rafael Copquin Sent: Wednesday, February 08, 2012 10:37 AM To: profoxt...@leafe.com Subject: decimals in remote data My last post was directly translated from the same one in Spanish sent to a local users group, and I missed translating the subject Here it goes again, please help me Rafael quote I have an app built in VFP9SP2 as a front end and SQLServer Express 2008 RS2 as backend. The connection is made by ODBC and the network is a LAN (no internet involved) Using SQL PassThrough I bring records from a table with a numeric data field of size 14 with 4 decimals. If I run the sql sentence in TSQL , using the Management Studio,like so: select code,descrip,qty from stock where code = 'XD-98789' I get the correct result, namely: code descrip qty XD-98789 WIDGET 3585256,1234 But, running the same sentence in SPT, like so: cCode ='XD-98789' sqlexec(nHandle,[select code,descrip,qty from stock where code =]+[']+cCode+['],'curStock') I get the following result code descrip qty XD-98789 WIDGET 3585256,12 (it shows 2, not 4 decimals) SET DECIMALS TO 4 is useless. But the worst is if I use SET FIXED ON and then SET DECIMALS TO 4 code descrip qty XD-98789 WIDGET 3,585 It truncates the integer part of the quantity and shows the result with 4 decimals, which are the following digits of the integer part. What the heck is going on here? unquote Rafael Copquin [excessive quoting removed by server] _______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/DF1EEF11E586A64FB54A97F22A8BD0441D4A8C08C0@ACKBWDDQH1.artfact.local ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.