When you add a NULLable field to a table, VFP adds a hidden column (another field) it uses to store a bitmap representing the NULL status of each field in the table.
I'm not sure why your solution fixed it, but I'm glad it did. SDF is a space-padded file format, "columnar data" and an ancient XBase command. I suspect there may be a subtle bug here where VFP queries the fields length and gets a bogus reponse that cause it to calculate padding wrong. Interesting bug. On Mon, Aug 15, 2016 at 4:03 PM, Kurt Wendt <[email protected]> wrote: > OK Ted - here's what I did - and what assumptions I am making. As mentioned > in my previous reply - I tested making the change from a numeric field of > 17,2 to 18,2 - and that seems to have fixed the problem! > > My assumption? My guess is that by enabling NULL for a field - that it > actually has to use a character of that field to store extra info about the > NULL usage. So - by making the field a total length of 18 instead of the > prior length of 17 - I get back that character that I lost to the NULL data > implementation. > > Does that make sense? Logical sense?? > > Regards, > Kurt Wendt > Senior Systems Analyst > > > Tel. +1-212-747-9100 > www.GlobeTax.com > > > -----Original Message----- > From: ProfoxTech [mailto:[email protected]] On Behalf Of Ted Roche > Sent: Monday, August 15, 2016 3:07 PM > To: [email protected] > Subject: Re: Complications with NULLS > > SDF? Woah, what a blast from the past! > > Perhaps you need to transform the NULL data to actual blank blanks before > exporting, something like: > > SELECT field1, field2, NVL(field3,space(1)) as field3, field4 from mydata... > COPY TO ... TYPE SDF > > On Mon, Aug 15, 2016 at 1:45 PM, Kurt Wendt <[email protected]> wrote: >> No - not true. Everything works - in as far as data is generated. It's just >> that the Text file is short by a blank in the one data column that contains >> a field that accepts the NULL values. >> >> Text files are basically generated using: >> COPY TO ... TYPE SDF >> >> I say basically because a data header type file is generated with the same >> COPY TO type command, and then low-level file handling is used to put the >> header and data into the same Txt file. >> >> Regards, >> Kurt Wendt >> Senior Systems Analyst >> >> >> Tel. +1-212-747-9100 >> www.GlobeTax.com >> >> >> -----Original Message----- >> From: ProfoxTech [mailto:[email protected]] On Behalf Of >> Ted Roche >> Sent: Monday, August 15, 2016 12:21 PM >> To: [email protected] >> Subject: Re: Complications with NULLS >> >> So, the changes you made to put NULLs in the data for the Excel files work >> for Excel, but don't work for the text generation? How do you generate the >> text files? >> >> On Mon, Aug 15, 2016 at 11:58 AM, Kurt Wendt <[email protected]> wrote: >>> The VFP app gens the Txt file. It does the generation of the 2 files in >>> sequence - and they can choose to generate or Not generate each file during >>> the processing. >>> >>> Regards, >>> Kurt Wendt >>> Senior Systems Analyst >>> >>> >>> Tel. +1-212-747-9100 >>> www.GlobeTax.com >>> >>> -----Original Message----- >>> From: ProfoxTech [mailto:[email protected]] On Behalf Of >>> Ted Roche >>> Sent: Monday, August 15, 2016 11:54 AM >>> To: [email protected] >>> Subject: Re: Complications with NULLS >>> >>> On Mon, Aug 15, 2016 at 11:48 AM, Kurt Wendt <[email protected]> >>> wrote: >>>> But, then they need to generate this Text file output - which gets sent to >>>> clients. Those Txt files are then imported into their systems. And, >>>> needless to say - the format of the Text files must stay consistent and >>>> MUST be properly formatted. >>>> >>>> So - imagine my surprise to learn that the Text files were wrong. >>> >>> Are "they" generating text files from the Excel output, or are they using >>> the VFP app that generated the Excel files to do it? >>> [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/CACW6n4td4v+9h-re1EDg=+1pGW0=qyjjcvwvhw5tqnsqshj...@mail.gmail.com ** 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.

