Hi, I'm working with VB.NET and MS Access XP. I've been given a database and, I'm unfamiliar with it's format. It appears to be a "linked database" or a database with "linked tables" (terminology?). The name of the db is "kilopost.dbf". When I open it and view the table it contains (named "kilopost"), a new database file named "kilopost1.mdb" is created which, contains the same information as the "kilopost.dbf". This will repeat as many times as I view the table apparently (kilopost2.mdb, kilopost3.mdb, kilopost4.mdb... etc. will be created). Each one of those files contains a table named "kilopost" which is linked to "kilopost.dbf".

Anyway, my problem is that I'm trying to read from this database using vb.net's "OleDbDataReader". I have no problem reading from my other .mdb files. Here is the error message produced when I try to access the kilopost database:

VB Code:
  1. System.Data.OleDb.OleDbException: The Microsoft Jet database engine cannot find the input table or query 'kilopost'.  Make sure it exists and that its name is spelled correctly.
  2.    at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(Int32 hr)
  3.    at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult)
  4.    at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
  5.    at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult)
  6.    at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
  7.    at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior)
  8.    at CT_CPT_DB.Form1.btnPopLists_Click_1(Object sender, EventArgs e) in C:\Documents and Settings\Paul\My Documents\Work\VS_Proj\VB\Create_CPT_DB\CT_CPT_DB\Form1.vb:line 685
The database does exist and the name and path are correct. I am successfully connecting to and reading from another .mdb in the same app.

Here's a snippet of code:
VB Code:
  1. Dim strSQL1 As String
  2.         Dim strSQL2 As String
  3.         Dim strSQL3 As String
  4.  
  5.         strSQL1 = "SELECT * FROM cty_rte_pm_ea"
  6.         strSQL2 = "SELECT * FROM kilopost"
  7.  
  8.         Dim cmdCptMetaData As New OleDbCommand(strSQL1, odbConnCptMetaData)
  9.         Dim cmdKilopost As New OleDbCommand(strSQL2, odbConnKilopost)
  10.  
  11.         odbConnCptMetaData.Open()
  12.         odbConnKilopost.Open()
  13.  
  14.         Try
  15.             Dim cptMetaDataReader As OleDbDataReader = _
  16.                             cmdCptMetaData.ExecuteReader(CommandBehavior.CloseConnection)
  17.             Dim cptKilopost_Reader As OleDbDataReader = _
  18.                             cmdKilopost.ExecuteReader(CommandBehavior.CloseConnection)

Thanks for your help!

Paul