Trying to connect to a Lotus .WK1 file

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
 
Joined
Mar 7, 2013
Messages
1
Reaction score
0
Just wondering if you found a resolution for this. I am hitting the same issue. Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top