none
Reading DBase IV table error from ADO.net odbc driver !!! help please RRS feed

  • Question

  •  

    I  connect a dbase IV table with odbc driver connection on Server explorer.

    then use dataset schema (Drag and drop to designer on VS) to generate the dataset and adapters code.

    it works on some tables.

    but some tables failed with this error msg:

     

    ****************************************************************

    Exceptions in transfer notes. details:ERROR [07009] [Microsoft][ODBC dBase Driver] Invalid argument.   at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
       at System.Data.Odbc.OdbcDataReader.GetData(Int32 i, SQL_C sqlctype, Int32 cb, Int32& cbActualOut)
       at System.Data.Odbc.OdbcDataReader.internalGetString(Int32 i)
       at System.Data.Odbc.OdbcDataReader.GetValue(Int32 i, TypeMap typemap)
       at System.Data.Odbc.OdbcDataReader.GetValue(Int32 i)
       at System.Data.Odbc.OdbcDataReader.GetValues(Object[] values)
       at System.Data.ProviderBase.DataReaderContainer.CommonLanguageSubsetDataReader.GetValues(Object[] values)
       at System.Data.ProviderBase.SchemaMapping.LoadDataRow()
       at System.Data.Common.DataAdapter.FillLoadDataRow(SchemaMapping mapping)
       at System.Data.Common.DataAdapter.FillFromReader(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue)
       at System.Data.Common.DataAdapter.Fill(DataTable[] dataTables, IDataReader dataReader, Int32 startRecord, Int32 maxRecords)
       at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
       at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
       at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
       at FPTransferDataSetTableAdapters.ContHistTableAdapter.Fill(ContHistDataTable dataTable)

     

    *********************************************************************************

    the connect is made without problem. but this error occurs on some dbase tables.  I can't find any info. on the error number on google.   Hopefully, you can provide some tips. is security problems or dbase files corrupted!!!

     

     

    Friday, September 28, 2007 2:07 AM

Answers

All replies

  • On the tables where it fails, are they using any different data types?

     

    Friday, September 28, 2007 12:17 PM
  • what I m doing is bascially converting client's softare database into my company database.

    there could be schema differences on column ordinals on clients software db.

    but I m not sure abt it.

     

    if their column ordinal is different from mine, I guess it could cause problems when processing SQL select statement in dbase.  I can't access clients ' databases, now it makes debugging very difficult.

     

    do u know how to identify the problems and some possible solutions?

     

    is any other reasons could make Fill() methods fail?

     

     

     

    Monday, October 8, 2007 1:57 AM
  • Have you tried using Jet OLEDB/dBase ISAM combination instead of ODBC? Do these dBase database files contain any memo columns?

     

    Tuesday, October 9, 2007 6:30 PM
  • There are memo fields in the table.

    fortunately, I obtained one of the clients database today. and I run debugging and doesn't have this error with ODBC driver.

    could it be installation issue?  I m testing it on a vitual machine today. if I find any problem. I will post here.

     

     

    Wednesday, October 10, 2007 12:14 AM
  •  

    now I got the database which can't be readed on clients machine.

     

    I m able to read them properly on my PC with same code.

     

    so I think on the client machine, there are different version of MDAC drivers for dbase IV.

     

    even though my application installer checks if the MDAC is 2.8 or above, it's still possible some application can register old dll drivers.  I think my clients's MDAC is 2.8, but some of his dbase driver is old.

     

    so what dll should I include in my installer to make it work? any ideas?

     

     

    Tuesday, October 23, 2007 1:30 AM
  • The ODBC desktop drivers are no longer installed with MDAC as of version 2.6. However, they should be installed with the latest Jet Service Pack (SP8).

     

    Tuesday, October 23, 2007 2:44 PM
  •  

    the client has installed the Jet 4.0 SP8 and his odbcjt32.dll version is 4.0

     

    The problem still remains on his PC.

     

    I really dont' know what could cause this bloody error. It even works on a fresh xp virtual PC here.

     

    do u have any other ideas?

    Tuesday, October 30, 2007 11:16 PM
  •  Paul P Clement IV wrote:
    Have you tried using Jet OLEDB/dBase ISAM combination instead of ODBC? Do these dBase database files contain any memo columns?

     



    I've the same error as tangy, and the table contains memo field (that's what I need). I would like to use OLEDB instead of ODBC but I don't know what to write in the connection string.

    Could you help me ?
    Thursday, March 6, 2008 9:49 AM
  • If you're looking for the connection string for Jet OLEDB/dBase see the following:

     

    http://www.connectionstrings.com/?carrier=dbffoxpro

     

     

     

    Thursday, March 6, 2008 3:11 PM
  • thanks for the site. it's very helpfull 

    but my problem isn't resolve anyway. I use VC# express and want to import dBase III tables. I tried to connect with Odbc but the DataSet.Fill method doesn't work. So I tried with OleDb and it works ... but (there is always one ) I got signs instead of accents and as I'm french (nobody's perfect  ) there's a lot of accents everywhere.

    Do you have any ideas ?
    Thursday, March 20, 2008 2:40 PM
  • Do you know whether you are using the BDE (Borland Database Engine) driver?

    How to control whether Access loads the Borland Data Engine (BDE)



    Thursday, March 20, 2008 4:07 PM
  • I work with Delphi 7 for the main devs so this driver may be installed. I checked the registry, had to add the key and tested the values 0 (use BDE if installed) and 2 (do not use BDE). The second value work's fine , even if I got a new length error but that's not a problem.

    Thanks a lot for your help. Could you explain to me why the BDE driver doesn't allow accents ?
    Tuesday, March 25, 2008 8:45 AM
  • Well that's interesting because I would have thought that the BDE would have supported this feature but it sounds like it's the Microsoft ISAM driver that is actually working for you. Not sure why the BDE isn't working properly. That sounds like a question for Borland, or CodeGear, or whatever they call themselves these days. ;-)

     

    Tuesday, March 25, 2008 12:59 PM