Ask Experts Questions for FREE Help !
Ask
    isoumya2010's Avatar
    isoumya2010 Posts: 1, Reputation: 1
    New Member
     
    #1

    May 25, 2015, 12:42 AM
    Problem in Accessing MS Access 2010 using UCanAccess Library
    Hi -

    I am trying to write a java program to Query a MS Access File (2010). The file is connected to a Share Point Site. I am using UCanAccess libraries to get it done. Following is the code snippet I am trying to run...

    String fileName = "D:/UcanAccess/sample.accde";
    try {
    // Class.forName("net.ucanaccess.jdbc.Ucanaccess Driver");
    con = DriverManager.getConnection("jdbc:ucanaccess://" + fileName + ";memory=false");
    st = con.createStatement();
    rs = st.executeQuery("SELECT DISTINCTROW Opportunity.* FROM Opportunity WHERE (((Opportunity.Global_Ops)=True))");
    int counter = 0;
    while (rs.next()) {
    counter++;
    }
    System.out.println("Total Records Count: " + counter);
    } catch (SQLException e) {
    e.printStackTrace();
    }

    White running the code, instead of getting windows authentiation pop-up window, I am getting following error...

    WARNING:External file D:\UcanAccess\http:\sharepoint_site_url\sites\0152 76;LIST=UserInfo;VIEW=;RetrieveIds=Yes does not exist
    WARNING:given file does not exist: http:\sharepoint_site_url\sites\015276;LIST=UserIn fo;VIEW=;RetrieveIds=Yes
    net.ucanaccess.jdbc.UcanaccessSQLException: user lacks privilege or object not found: OPPORTUNITY
    at net.ucanaccess.jdbc.UcanaccessStatement.executeQue ry(UcanaccessStatement.java:202)
    at TestUcanAccess.main(TestUcanAccess.java:25)
    Caused by: java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: OPPORTUNITY

    I tried to get it done using Jdbc-Odbc Driver and it worked perfectly in JDK1.7 but in JDK1.8 it did not work as Jdbc-Odbc driver has been removed from JDK1.8 environment. That's why I am opting for UCanAccess Libraries.

    So, Please help me out to resolve the exact issue I am having.

    Please note, If I remove share point site reference, the above mentioned code is working fine.

    Please Help. Thanks in Advance for any sort of Help.

Check out some similar questions!

Track use in access 2010 [ 12 Answers ]

I've created a database that supervisors, managers, directors, and senior administration can use to log employee "Performance Events." Like praise or coaching. We have many sites and employees often "float" under different management. For this reason, all management can view all events. We want...

MS Access DB 2010 [ 1 Answers ]

I created a simple access db, with 1 table and 3 columns. Table Name: Machining_Fixtures Column 1 Name: ID Column 2 Name: Location Column 3 Name: Fixture There are 500 records in this table. I just want to be able to enter the location and have it bring me back the fixture, or enter the...

Can Access 2000 Object Library use a different Const, than msoFileDialogFilePicker? [ 3 Answers ]

I used Access 2003 to create a database and saved as Access 2000 format. I used some code that downloads a logo. This won't work in Access 2000 because of the Library Microsoft Office 9 Object Library can't pick up the msoFileDialogFilePicker object. It think it's a variable. I'm not sure if...

Unable to access the Online Catalog of Library [ 1 Answers ]

Hi Experts I am Library Professional.One day a user came to me and told me that he is unable to access the OPAC (Online Public Access Catalog) services from his home I mean in LAN. But enquirred in library that in Intranet it was running. So experts I want the solution from you that what problem...

Problem in accessing Yahoo mail [ 2 Answers ]

Hi all I have a problem with my Yahoo mail account during may account access an error message is displaying as "Temporary problem in accessing your account " can anybody Help me to get my account with same Thanking u all


View more questions Search
 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.