Loading DBF file into grid works on some machines

  • Thread starter Thread starter Darin
  • Start date Start date
D

Darin

I have 2 developemnt machines here, an XP Pro and 2000 pro. The
following code works on both:

Dim connS As String
Dim tmpConnection As System.Data.OleDb.OleDbConnection
Dim da As System.Data.OleDb.OleDbDataAdapter
Dim ds As DataSet
Dim dt As DataTable
Dim drRow As DataRow
Dim cnt As Integer
Dim strsql As String
Dim xfile As String
xfile = cboFile.Text

'connS = "Driver={Microsoft dBASE Driver
(*.dbf)};DriverID=277;Dbq=\inware\data\df\;"
connS = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=\inware\data\df\;Extended Properties=dBASE IV;User
ID=Admin;Password="
tmpConnection = New System.Data.OleDb.OleDbConnection(connS)
strsql = "SELECT TOP 100 * FROM " & xfile
strsql = "SELECT * FROM " & xfile
da = New System.Data.OleDb.OleDbDataAdapter(strSQL,
tmpConnection)
ds = New DataSet(xfile)
da.Fill(ds, "Sheet1")
dt = ds.Tables("Sheet1")
gData.DataSource = dt
tmpConnection.Close()

That same code on the customers Win2000 server, XP pro and 2000 Pro
machines all display:

Index not found.

System.Data.OldDb.OleDbException: index not found
etc
etc
etc
at System.Data.Common.DbDataAdapter.Full(DataSet dataSet, String
srcTable)

Any ideas?

Darin
 
I have the same problem and no solution found until today. You can
inform me if you got ahead?
I have XP pro and W2003 where to work however different Xp's will not
work

Thomas
 
when i take the foxpro-driver for dbase it works on all machines!
(Provider=VFPOLEDB;) the OleDbDriver you can load from internet
Thomas
 
Back
Top