Connecting Tech Pros Worldwide Forums | Help | Site Map

Database share

Newbie
 
Join Date: Oct 2008
Posts: 3
#1: Oct 14 '08
hello everybody,

i create program asp use database *.dbf with odbc
if the database in the local pc ok, but if the database in the other pc use network the result error,"not valid path".

and try use database mdb, in local pc ok,but in the other pc use network is the same error.

why is error?......

please!....

thank's and best regrads

jeffstl's Avatar
Expert
 
Join Date: Feb 2008
Posts: 414
#2: Oct 14 '08

re: Database share


How did you key in your database path in the code?

Did you use a letter mapping or a absolute path? (C:\.mdb or \\TheserverName\Root\.mdb)

Do the users have access to the network drive the file is on? If not this could also be the problem.
Newbie
 
Join Date: Oct 2008
Posts: 3
#3: Oct 15 '08

re: Database share


I use windows XP Pro sp1 and ODBC driver for Microsoft Dbase Driver (.dbf)
in ODBC select directory I using Mapping Drive (Z:\)


Dim cn, rs, rs1
Dim StkOpn


Set cn=Server.CreateObject("ADODB.Connection")
Set rs=Server.CreateObject("ADODB.Recordset")
Set rs1=Server.CreateObject("ADODB.Recordset")

cn.open "DSNWEBHERO","",""
mysql = "Select * From Product Where ProdCode='" & request.Form("txtSearch") & "'"
mysql1 = "Select * From opname Where ProdCode='" & request.Form("txtSearch") & "'"

rs.Open mysql,cn,2,3



rs.close
rs1.close
cn.close

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[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 can access for mapping drive in the network

Thank's and best regrads
jeffstl's Avatar
Expert
 
Join Date: Feb 2008
Posts: 414
#4: Oct 15 '08

re: Database share


Quote:

Originally Posted by joedermawan

I use windows XP Pro sp1 and ODBC driver for Microsoft Dbase Driver (.dbf)
in ODBC select directory I using Mapping Drive (Z:\)


Dim cn, rs, rs1
Dim StkOpn


Set cn=Server.CreateObject("ADODB.Connection")
Set rs=Server.CreateObject("ADODB.Recordset")
Set rs1=Server.CreateObject("ADODB.Recordset")

cn.open "DSNWEBHERO","",""
mysql = "Select * From Product Where ProdCode='" & request.Form("txtSearch") & "'"
mysql1 = "Select * From opname Where ProdCode='" & request.Form("txtSearch") & "'"

rs.Open mysql,cn,2,3



rs.close
rs1.close
cn.close

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[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 can access for mapping drive in the network

Thank's and best regrads

At best without seeing the configuration of the DSN I would say that pc that is having the problem may have access rights denied for that dsn...but even then if this is a web app that shouldnt be happening...

Obviously though according to the error the problem is with your database path in some way shape or form. You can prove this by changing your connection string to have a direct path instead of using DSN and then test it on the problem pc.
Reply