Trying to connect to a Lotus .WK1 file

  • Thread starter Thread starter Marty
  • Start date Start date
M

Marty

As said in the title I am trying to connect to a .WK1 file. Here is my
code so far:
If (.ShowDialog() = Windows.Forms.DialogResult.OK) Then
strFilePath =
System.IO.Path.GetDirectoryName(.FileName)
strFileName =
System.IO.Path.GetFileNameWithoutExtension(.FileName)
lstLode.Items.Add(strFileName)
lblLodePath.Text = strFilePath
End If
' Connect to the .WK1 file
Try

Dim connString As String =
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & .FileName &
";Extended Properties=""Lotus WK1;HDR=Yes;IMEX=1"""
Dim myConnection As New
System.Data.OleDb.OleDbConnection(connString)
Dim mySelectQuery As String = "SELECT * FROM [" &
strFileName & "]"
Dim myCommand As New OleDb.OleDbCommand(mySelectQuery,
myConnection)
myConnection.Open()
Dim myReader As OleDb.OleDbDataReader
myReader = myCommand.ExecuteReader()
myConnection.Close()
Catch ex As Exception
MessageBox.Show(ex.Message, "Data Reader Error",
MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
End Try

I keep getting this error :
The Microsoft Jet database engine could not find the object 'AB07'.
Make sure the object exists and that you spell its name and the path
name correctly.

ABO7.wk1 is the name of my test file.

Any help would be appreciated
 
Just wondering if you found a resolution for this. I am hitting the same issue. Thanks.
 
Back
Top