Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Decimal field width inconsistency
Message
From
09/09/2011 14:27:41
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2008
Application:
Desktop
Miscellaneous
Thread ID:
01523093
Message ID:
01523103
Views:
38
I import from a text file with APPEND FROM TestFile.txt SDF.

This function uses the length of the fields to determine the fields how they are imported. Instead of putting 10 characters into my field, it places additional two characters from the next field, because VFP assumes the field width to be 12 instead of 10.

>VFP stores numeric(N) data type in a table as a string. As result it has to reserve 1 additional position for a sign and one for a decimal point.
>
>Why it's a problem?
>
>>
>>I create a table in MsSQL with
>>
>>CREATE TABLE Test (test Decimal(10,0))
>>
>>
>>When I query from this table
>>
>>SQLEXEC(1,"SELECT * FROM Test","cuTest")
>>
>>Then the field Test.test is 12 decimals.
>>How can that be, and how can I avoid this inconsistency?
Christian Isberner
Software Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform