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:[email protected]] On Behalf Of Fred Taylor
Sent: Tuesday, June 14, 2016 4:44 PM
To: [email protected]
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 <[email protected]> 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:[email protected]] On Behalf Of 
> Dave Thayer
> Sent: Tuesday, June 14, 2016 4:32 PM
> To: [email protected]
> 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 <[email protected]> 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 
> > <[email protected]>
> 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]

_______________________________________________
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/80838f1ca795b14ea1af48659f35166f2bd...@drexch02.corp.globetax.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.

Reply via email to