Re: D3 ODBC Problem



"SteveS" wrote
D3 ODBC Problem:
Having a problem with a file in D3. While use Winsql to troubleshoot I
get the following error.

Error: Query aborted - non-numeric value encountered when numeric
required (State:S1000, Native Code: 0)

I've looked at the record that it stops at and the following record
and the field appears to be fine. It is a Quantity field that is
numeric but I can not see any bad data.

Can anyone offer a suggestion to get around this problem?

Thanks,

Steve
A better question is "how did this field get set as numeric,
instead of, say, text?

For instance, I had a file in d3/linux with dict entry for Name
and one for Zipcode, both had very similar dict contents, but
with most of my zipcodes being nnnnn-nnnn or just nnnnn
that field sucks into an Excel spread*** {via Microsoft Query,
as usual} as type Numeric, and gave a barf message quite like
you got when it found an item with just a "-"
[I wonder if you've got a space or some control characters in your d3
items that is tripping the 'non-numeric' condition in the odbcsrv
d3 odbc driver...]

That is, does the 'numeric' data type get determined each time you
run a query, or is it guesstimated from a short survey of data present
on the d3 file when you do your sql-create-table command? If the
latter, then your workaround would be to temporarily replace your
file data with a few sample items but stick lotsof text in this problem
field, then create the table again with the update flag, and it will
consider the field text, or at least not straight numeric, even after you
put back in place your true desired data on the d3 side.

A better solution would be to write a basic program to comb your data
for non-digits and report back any odd data found. Make sure your
data entry staff knows not to use their arrow keys when correcting typos,
as the escape sequences they create only mask the typo, not truly fix it,
and those escapes will upset d3 and odbc mildly.


.


Quantcast