[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

microsoft.public.dotnet.framework.odbcnet

ODBC Microsoft dBase III driver and C#

Dave F.

4/26/2005 6:02:00 PM

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 data just fine. The problem comes when I try to Insert a new row.
After the INSERT something seems to corrupt the header in the dBase file.
dBase III can't read the file. The error returned says that file is not a
dBase database file.

The same ODBC driver "Microsoft dBase Driver (".dbf")" works without a
problem in a Cold Fusion app. The problem occurrs using the ODBC framework
class in C#

Any ideas?


2 Answers

Paul Clement

4/26/2005 6:07:00 PM

0

On Tue, 26 Apr 2005 11:02:23 -0700, "Dave F." <dflowers@gmail.com> wrote:

&#164; I know, don''t laugh! We have an old legacy app that uses dBase III+ files.
&#164; They will be replaced over the next couple of years with .NET apps and an
&#164; SQL Server database.
&#164;
&#164; But for now I need to access the data using C# in an ASP.NET app. I can read
&#164; all the data just fine. The problem comes when I try to Insert a new row.
&#164; After the INSERT something seems to corrupt the header in the dBase file.
&#164; dBase III can''t read the file. The error returned says that file is not a
&#164; dBase database file.
&#164;
&#164; The same ODBC driver "Microsoft dBase Driver (".dbf")" works without a
&#164; problem in a Cold Fusion app. The problem occurrs using the ODBC framework
&#164; class in C#

Have you tried using the Jet OLEDB Provider with the dBase ISAM instead?


Paul
~~~~
Microsoft MVP (Visual Basic)

Dave F.

4/29/2005 12:25:00 AM

0

Hi Paul,

I just tried your suggestion and end up with the same results. The good
thing is that ASP.NET will still open and display the contents even though
dBase III/III+ won''t. According to MS it seems to be a problem with dBase
III/III+ only. If you insert a row into the file after 12/31/2000 using
anything but dBase III/III+ the date in the file header is changed and dBase
can''t read it. Seems every other ODBC database tool can read the file. I''ll
just use VFP to work with them.

I hope the dBase files will be phased out in the next year or so. They''ve
lived long enough.

Thanks,
Dave

"Paul Clement" <UseAdddressAtEndofMessage@swspectrum.com> wrote in message
news:jp0t61dhrmhp094b4t76s16cu07ieg8ita@4ax.com...
> On Tue, 26 Apr 2005 11:02:23 -0700, "Dave F." <dflowers@gmail.com> wrote:
>
> &#164; I know, don''t laugh! We have an old legacy app that uses dBase III+
> files.
> &#164; They will be replaced over the next couple of years with .NET apps and
> an
> &#164; SQL Server database.
> &#164;
> &#164; But for now I need to access the data using C# in an ASP.NET app. I can
> read
> &#164; all the data just fine. The problem comes when I try to Insert a new
> row.
> &#164; After the INSERT something seems to corrupt the header in the dBase
> file.
> &#164; dBase III can''t read the file. The error returned says that file is not
> a
> &#164; dBase database file.
> &#164;
> &#164; The same ODBC driver "Microsoft dBase Driver (".dbf")" works without a
> &#164; problem in a Cold Fusion app. The problem occurrs using the ODBC
> framework
> &#164; class in C#
>
> Have you tried using the Jet OLEDB Provider with the dBase ISAM instead?
>
>
> Paul
> ~~~~
> Microsoft MVP (Visual Basic)