Hi I'm trying to open a dBASE file with non-standard file extension using ADO and JScript. My code is as follows:
var szDatabasePath = "C:\\Example\\";
var szConnection = "Driver={Microsoft dBase Driver (*.dbf)};DriverID=277;Dbq=" + szDatabasePath;
var oDBConn = new ActiveXObject("ADODB.Connection"); oDBConn.Open(szConnection);
var oRS = oDBConn.Execute("SELECT * FROM example#ven");
The output is as follows:
C:\Example\Parse.js(14, 1) Microsoft OLE DB Provider for ODBC Drivers: [Microsoft][ODBC dBase Driver] The Microsoft Jet database engine could not find the object 'example.ven'. Make sure the object exists and that you spell its name and the path name correctly.
If I rename file to .dbf extension, it works. How can I get this to work with different extension I am following documentation from:
http://www.hide-link.com/ %3Ben-us%3B101742
Thanks!
.NET Development12
|