[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.odbcnet

Accessing DBF DBASE II data via ODBC returns NULLs for some decimal fields

drv62

10/8/2006 9:23:00 PM

I have a series of DBF files that I want to import into a SQL database.
When I query a few of the files using ODBC (DBF driver), OLE.DB (Jet
4.0) the fields that are decimal and have values are returned as NULL.
Looking at the internals, I can see no differences in the headers of
the files (field types, indexes, etc.) and the non-decimal fields are
returned ok. Loading them via other DBF viewer utilities the data
shows as expected. Any ideas?

Thanks

5 Answers

Cindy Winegarden

10/11/2006 6:20:00 PM

0

Hi!

I''ve never worked with Dbase II files (only with FoxPro DBFs) but I know
that in Fox DBFs fields of numeric data type are actually stored as
characters. a format N(6,4) means 6 characters wide with 4 after the decimal
point, such as 1.2345 . However, Fox numeric fields will accept non-standard
values such as 1234.5 in the N(6,4) field - in other words any number with 5
digits no matter where the decimal point lies. This can confuse other
databases when accessed via ODBC.

--
Cindy Winegarden MCSD, Microsoft Most Valuable Professional
cindy@cindywinegarden.com


<drv62@yahoo.com> wrote in message
news:1160342606.426081.42830@i42g2000cwa.googlegroups.com...
>I have a series of DBF files that I want to import into a SQL database.
> When I query a few of the files using ODBC (DBF driver), OLE.DB (Jet
> 4.0) the fields that are decimal and have values are returned as NULL.
> Looking at the internals, I can see no differences in the headers of
> the files (field types, indexes, etc.) and the non-decimal fields are
> returned ok. Loading them via other DBF viewer utilities the data
> shows as expected. Any ideas?
>
> Thanks
>


tool

1/10/2013 3:46:00 PM

0

Joshua Kreitzer <gromit82@hotmail.com> wrote:
> msb@vex.net (Mark Brader) wrote in news:fcWdnbMal-
> OT7XPNnZ2dnUVZ_qednZ2d@vex.net:
>
> >> 14. 1998 movie.
> >
> > "V For Vendetta". 4 for Gareth and Stephen.

> I'd like to request that this question be thrown out and everyone given
> credit. "V for Vendetta" wasn't released anywhere until 2005 (and went into
> regular release in 2006).

Yeah. I spent a lot of time trying to figure out what 1998 movie could possibly
have a poster that looked so much like a V for Vendetta poster.

--
_______________________________________________________________________
Dan Blum tool@panix.com
"I wouldn't have believed it myself if I hadn't just made it up."

msb

1/10/2013 8:48:00 PM

0

Mark Brader;
>>>> 14. 1998 movie.
>>>
>>> "V For Vendetta". 4 for Gareth and Stephen.

Joshua Kreitzer:
>> I'd like to request that this question be thrown out and everyone given
>> credit. "V for Vendetta" wasn't released anywhere until 2005 (and went into
>> regular release in 2006).

Dan Blum:
> Yeah. I spent a lot of time trying to figure out what 1998 movie could
> possibly have a poster that looked so much like a V for Vendetta poster.

Sorry about that; it never occurred to me that I needed to check the
dates given. But I think this falls under the league's rule that
"you can't protest the question". Scores stand.
--
Mark Brader, Toronto | "Any sufficiently advanced bug is indistinguishable
msb@vex.net | from a feature." -- Rich Kulawiec (after Clarke)

My text in this article is in the public domain.

msb

1/11/2013 9:36:00 PM

0

Mark Brader:
>> Nobody checked that the car-deck's bow doors were closed before
>> departure, and they were fully open. (Any reference to open doors was
>> sufficient; I therefore scored "unsealed" or "not correctly closed"
>> doors as almost correct.) 4 for Erland, Stephen, and Joachim. 3 for
>> Bruce and Gareth.

Gareth Owen:
> Well the distinction between "open" and "not closed" is a little subtle
> for me...

It was "not correctly closed", or more precisely, "not closed correctly",
not "not closed". Your wording implies that they were closed badly,
rather than wide open.
--
Mark Brader | "And don't forget there were five separate computers
msb@vex.net | in those days."
Toronto | -- Bob NE20G3018 (Ira Levin, "This Perfect Day")

Erland Sommarskog

1/12/2013 10:13:00 AM

0

Gareth Owen (gwowen@gmail.com) writes:
> I think "wide open" is pretty clearly located on the "closed badly"
> spectrum.

Mark's point is that they did not even attempt to close it.

Incredible as it seems, this is not the only ship disaster that happened
for this reason.



--
Erland Sommarskog, Stockholm, esquel@sommarskog.se