MSDOTnet.org Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Accessing DBF DBASE II data via ODBC returns NULLs for some

 
Post new topic   Reply to topic    MSDOTnet.org Forum Index -> ODBC Dotnet
Author Message
drv62



Joined: 08 Aug 2007
Posts: 1

PostPosted: Sun Oct 08, 2006 6:23 pm    Post subject: Accessing DBF DBASE II data via ODBC returns NULLs for some Reply with quote

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

Archived from group: microsoft>public>dotnet>framework>odbcnet
Back to top
View user's profile Send private message
Cindy Winegarden



Joined: 08 Aug 2007
Posts: 3

PostPosted: Wed Oct 11, 2006 6:19 pm    Post subject: Re: Accessing DBF DBASE II data via ODBC returns NULLs for s Reply with quote

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


wrote in message @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
>

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
ODBC DataReader - dBase IV Hey, I've been working for the last few days on changing over a system from SQL Server to dBase IV (don't ask :0) ). Everything seems to be going well, except whenever I use the specifically use the overloa

ODBC Microsoft dBase III driver and C# I know, don't laugh! We have an old legacy app that uses dBase III+ files. They will be replaced over the next couple of years with .NET apps and an SQL Server database. But for now I need to access the data using C# in an ASP.NET app. I can read all the

[DBase ODBC] Internal Server Error. Hi, Framework 1.0 , ODBCNET, DBase files I get an 'Internal Server Error' page trying to get an empty DBase Char(10) field from a DataReader: myDataRow[0] = // The item is empty It doesn't throw an Exception.

Problems with System.Data.Odbc Hello I have a .net application in wich i want to create a connection pool usin odbc. I'm using and the version 1.1 of the framework. The problem is that i can't see the namespace and i read that it's native with the fra

System.Data.Odbc.OdbcException I have a little console app that I wrote in June using Visual Studio .NET to dump some data from an AS/400 into a CSV file. I've come back to this application today to make some additions and now, without changing anything at all in the application since
Post new topic   Reply to topic    MSDOTnet.org Forum Index -> ODBC Dotnet All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group