Really??
OK - here's the quick test I did. I took an existing DBF file, copied a couple records to a new Dummy.dbf. One of the fields was Numeric 5 0 Then - I simply went to one of the records and ran the following command: REPLACE errline WITH .NULL.
VFP then reports back - Field Errline does not accept null values.
Hmm...
Regards, Kurt Wendt Senior Systems Analyst
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Fred Taylor Sent: Tuesday, June 14, 2016 4:44 PM To: profoxtech@leafe.com Subject: Re: A Blank Value for a Number?
The DBF file has to allow NULL values.
Fred
On Tue, Jun 14, 2016 at 1:41 PM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
I forgot about NULL - as I haven't really used it much in VFP in the past.
I just tried doing a simple Replace of a value in a DBF file - that's numeric - with NULL - but, it gave an Error.
Regards, Kurt Wendt Senior Systems Analyst
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Dave Thayer Sent: Tuesday, June 14, 2016 4:32 PM To: profoxtech@leafe.com Subject: Re: A Blank Value for a Number?
D'oh!
Of course that should be:
UPDATE cFoo SET nBar = .NULL. WHERE nBar = 0
-- Dave Thayer Denver, CO On Tue, Jun 14, 2016 at 2:28 PM, Dave Thayer davethayer@gmail.com wrote:
IIRC, Excel will treat .NULL. values as blanks, so if you have a temporary cursor cFoo with a numeric column nBar something like UPDATE cFoo SET nBar = .NULL. WHERE nBar IS NULL should do the trick.
hth,
dt
Dave Thayer Denver, CO
On Tue, Jun 14, 2016 at 2:02 PM, Kurt Wendt Kurt_Wendt@globetax.com
wrote:
I know - it's a Crazy request. Trying to figure out the Easiest way to
try and do this - and hoping to Avoid having to do more complicated solutions like Office Automation to manipulate an Excel file.
So - here's the deal. This system I work on - it outputs this Excel
file. And, in the past - if there are certain records that have a Zero in a particular column - they would Manually wipe out the Zero - and also blank out several of the other fields in that Row.
But, the new request is to make those things happen automatically
during process when the Excel file gets exported. So that they do NOT have to manually blank out certain fields. But, of course, therein lies the problem. For the other rows of data - this particular field is supposed to be a numeric value. And, AFAIK - there really is NO Way to have a DBF or Cursor that has a Numeric field - and yet have blank values in it.
As such, I suspect the answer is that this can't be done - to have a
numeric data field hold any kind of blank data. They even suggested just a Dash. But, again - I figured it's not possible. However, I figured for the hell of it - I would post here - in case someone had an interesting insight that I hadn't thought of...
[excessive quoting removed by server]