CJ_S
asked on
DBase connection problem
Posting this question for a colleague (and I don't know the answer either).
-------------------------- -----
When trying to connect to a DSN DBase (dbf) file i get the following error:
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ------
[Microsoft][ODBC dBase Driver] '(unknown)' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ------
I have tried on another machine with the same exact DSN configuration and there was no error so i assume it is not the coding.
My connection is very simple:
-------------------------- ---------- ---------- ---------- ---------- ---------- -----
Set objDB=Server.CreateObject( "ADODB.Con nection")
objDB.Open("DSN=SUPERSITE; Uid=;Pwd=; ")
-------------------------- ---------- ---------- ---------- ---------- ---------- -----
When using this code on my workstation, where i created the "SUPERSITE" DSN pointing to a local DBF database, it works fine.
When using this code on the server, where i have the "SUPERSITE" DSN with the same configuration as my workstation, also pointing to a local DBF database, it gives the error.
The server is running Windows 2000 Advanced Server, the Workstation is running Windows 2000 Professional.
Maybe it is a file system permission problem?
I already spent many hours trying to solve this but without success so i hope someone can help me. :-)
--------------------------
When trying to connect to a DSN DBase (dbf) file i get the following error:
--------------------------
[Microsoft][ODBC dBase Driver] '(unknown)' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.
--------------------------
I have tried on another machine with the same exact DSN configuration and there was no error so i assume it is not the coding.
My connection is very simple:
--------------------------
Set objDB=Server.CreateObject(
objDB.Open("DSN=SUPERSITE;
--------------------------
When using this code on my workstation, where i created the "SUPERSITE" DSN pointing to a local DBF database, it works fine.
When using this code on the server, where i have the "SUPERSITE" DSN with the same configuration as my workstation, also pointing to a local DBF database, it gives the error.
The server is running Windows 2000 Advanced Server, the Workstation is running Windows 2000 Professional.
Maybe it is a file system permission problem?
I already spent many hours trying to solve this but without success so i hope someone can help me. :-)
ASKER
It's a DBVase V file, not DBase IV
ASKER
When using a DSNless connection (which i had already tried) i get the following error:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC dBase Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x468 Thread 0x6bc DBC 0x23917fc Xbase'.
The driver ID is also NOT 277. DriverID 277 is for DBase 4, this is a DBase 5 file...:-) And yes i already tried the right DriverID, gives the same error.
So either DSNless or DSN, none works...but on my workstation it works fine. :-) I still think its something to do with file system permissions...but nothing seems to make any difference...anyone had this prob before?
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC dBase Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x468 Thread 0x6bc DBC 0x23917fc Xbase'.
The driver ID is also NOT 277. DriverID 277 is for DBase 4, this is a DBase 5 file...:-) And yes i already tried the right DriverID, gives the same error.
So either DSNless or DSN, none works...but on my workstation it works fine. :-) I still think its something to do with file system permissions...but nothing seems to make any difference...anyone had this prob before?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Some times it is the easy solution!!! Thanks Gal! ;-)
use myDb = server.mapPath("my.dbf") if required.
http://www.able-consulting.com/ADO_Conn.htm
oConn.Open "Driver={Microsoft dBASE Driver (*.dbf)};" & _
"DriverID=277;" & _
"Dbq=c:\somepath"
Then specify the filename in the SQL statement:
oRs.Open "Select * From user.dbf", oConn, , ,adCmdText