Didier Duliere
asked on
error when the .DBF filename have a underscore in a OLEDB SQL Query
Hi experts,
I Must access the .DBF but in the name of the DBF file I’ve “underscore” like : CMSDB_ACT.DBF
But the code don't work with the underscore...
If I remove it, the code work, but I can do that, this is a DBF of a external software.
Can you help me ?
Kind Regards, Didier
I Must access the .DBF but in the name of the DBF file I’ve “underscore” like : CMSDB_ACT.DBF
But the code don't work with the underscore...
If I remove it, the code work, but I can do that, this is a DBF of a external software.
Can you help me ?
Kind Regards, Didier
Dim sCon As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=H:\Winbooks\Data\CMSDB;Extended Properties=dBASE IV;"
Dim con As New OleDbConnection(sCon)
Dim sql_winbooks As New OleDbCommand("SELECT * FROM CMSDB_ACT.DBF WHERE ISMATCHED = 0", con)
con.Open()
Dim dr_winbooks As OleDbDataReader = sql_winbooks.ExecuteReader
Why are you specifying .DBF in your query? Also, should your data source not have extension?
ASKER
Yes the data source have the extension
I've try without the extension, and I've the same error message :
The Microsoft Jet database engine could not find the object 'CMSDB_ACT'. Make sure the object exists and that you spell its name and the path name correctly.
I've try without the extension, and I've the same error message :
The Microsoft Jet database engine could not find the object 'CMSDB_ACT'. Make sure the object exists and that you spell its name and the path name correctly.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Many Thanks, that's ok !!!!