Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
COPY TO .. SDF integer padding bug?
Message
 
To
19/08/2005 14:41:55
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01042355
Message ID:
01042381
Views:
19
I understand the question, but I do not share the concern. SDF file has no indication about field type, length, etc, so it is hard to expect the exact data representation in the plain text format. Depending on other project pieces you probably need to choose another plain file format (like delimeted), or update sql tables while using another approach.

>>Franze,
>>
>>Could you give an example when the actual error occurs or the padding behavior is not acceptable? For instance, there are no errors in this scenario:
>>
>>
>>sele junk
>>APPEND FROM C:\TEMP\JUNK.txt SDF FIELDS INT1, FNAME, LNAME
>>
>>
>
>Yuri,
>
>Well, I would rather the result were predictable - as I said, the pad amount varies with different numbers of fields, etc... Moreover, I'm bulk loading into SQL SERVER using format files and I don't know how big (in advance) the integer column will be written from VFP, judging from this example.
>
>Here's another interesting example:
>
>
>
>CREATE CURSOR Mewp (int1 I, int2 I, char1 c(10), char2 c(10))
>INSERT INTO mewp (char1, char2, int1, int2) VALUES ('asdf','qwer',1,2)
>INSERT INTO mewp (char1, char2, int1, int2) VALUES ('zxcv','zxcv',3,4)
>INSERT INTO mewp (char1, char2, int1, int2) VALUES ('tyui','ghjk',5,6)
>COPY TO c:\temp\temp1.txt FIELDS char1, char2, int1, int2 sdf
>
>The integers are LEFT justified, 10 characters long
>
>
>- Franz
Previous
Reply
Map
View

Click here to load this message in the networking platform