Menu

Given File does not exist:

Help
2017-06-07
2017-06-09
  • Mike Mahoney

    Mike Mahoney - 2017-06-07

    I am working on a project to connect to an Access file on a remote PC. (for testing here at our office it is on "ERICK-PC"
    my connection url is jdbc:ucanaccess:////ERICK-PC/VisuaLCN/Data/SVRLATestData.mdb
    (I have tried with jdbc:ucanaccess://ERICK-PC... as well.

    On the remote PC the actual file path is C:\VisuaLCN\Data\SVRLATestData.mdb
    the VisuaLCN folder is shared and I can access said file via windows network.

    The error I receive back is:
    UCAExc:::3.0.4 given file does not exist: \ERICK-PC\VisuaLCN\Data\SVRLATestData.mdb

    My question is, is what I am trying possible? If so, what might I be doing wrong.
    Any suggestions would be greatly appreciated.

    Thanks,
    Mike

     
  • Gord Thompson

    Gord Thompson - 2017-06-07

    Yes, it is possible to use a UNC path if you are trying to connect from a Windows machine. The error message

    UCAExc:::3.0.4 given file does not exist: \ERICK-PC\VisuaLCN\Data\SVRLATestData.mdb

     
    suggests that you are simply missing a slash in your connection URL, i.e., you are using

    jdbc:ucanaccess:///ERICK-PC/VisuaLCN/Data/SVRLATestData.mdb
    

     
    when you should be using

    jdbc:ucanaccess:////ERICK-PC/VisuaLCN/Data/SVRLATestData.mdb
    

     
    By the way, version 3.0.4 is quite old. You really should upgrade to the latest version.

     

    Last edit: Gord Thompson 2017-06-07
  • Mike Mahoney

    Mike Mahoney - 2017-06-08

    Thank you Gord for your quick resoponse.

    Here is my connection URL with 4 forward slashes:
    (jdbc:ucanaccess:////ERICK-PC/VisuaLCN/Data/SVRLATestData.mdb)
    resulting in this error:
    (UCAExc:::3.0.4 given file does not exist: \ERICK-PC\VisuaLCN\Data\SVRLATestData.mdb)

    any ideas?
    Mike

     
  • Gord Thompson

    Gord Thompson - 2017-06-08

    Sorry for the confusion. It appears that the SourceForge forum software converts double backslashes to a single backslash when they are not part of a code block. :(

    Can you try this?

    java.io.File f = new java.io.File("//ERICK-PC/VisuaLCN/Data/SVRLATestData.mdb");
    System.out.printf("File#exists() returns %s%n", f.exists());
    
     
  • Mike Mahoney

    Mike Mahoney - 2017-06-09

    It appears I am making progress.
    The road block I am up against now seems to be authentication.

    I successfully mapped/accessed the file.

    here is my connection url:
    jdbc:ucanaccess:////ERICK-PC/VisuaLCN/Data/SVRLATestData.mdb

    And here is the error I get:
    (UCAExc:::3.0.4 invalid authorization specification - not found: Admin)

    Forgive my ignorance, on the matter. What I know is that it does not matter if I specify "Admin" as the username or not, I still receive this error. What I also know is that I do not know if there is such an account for this mdb and if there was, what a password would be. There are no forms/front end, it is just used as a database.

    Thanks,
    Mike

     
  • Mike Mahoney

    Mike Mahoney - 2017-06-09

    I just determined there is no User/password protection for file.
    So I don't understand why I am receiving the error???

     
  • Gord Thompson

    Gord Thompson - 2017-06-09

    I just determined there is no User/password protection for file.

     
    Do you mean that you were able to open the .mdb file in Access itself and you were not prompted for any password or user credentials?

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.