Database share

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • joedermawan
    New Member
    • Oct 2008
    • 3

    #1

    Database share

    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
    Recognized Expert Contributor
    • Feb 2008
    • 432

    #2
    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.

    Comment

    • joedermawan
      New Member
      • Oct 2008
      • 3

      #3
      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.Creat eObject("ADODB. Connection")
      Set rs=Server.Creat eObject("ADODB. Recordset")
      Set rs1=Server.Crea teObject("ADODB .Recordset")

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

      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

      Comment

      • jeffstl
        Recognized Expert Contributor
        • Feb 2008
        • 432

        #4
        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.Creat eObject("ADODB. Connection")
        Set rs=Server.Creat eObject("ADODB. Recordset")
        Set rs1=Server.Crea teObject("ADODB .Recordset")

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

        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.

        Comment

        Working...