2

I'm using jdbc with ucanaccess... When I connect to the database, there is one table that Ucanaccess is not finding... I saw that in debug mode in NetBeans...

Therefore when I try a transaction on that table, I get :

UCAExc:::4.0.3 user lacks privilege or object not found [Name of my table]

I guess everything else works perfectly since when I did a select on another table it worked...

I'm using :

  • ucanaccess 4.0.3
  • MS Access 2007
  • JDK : java 1.8.0_151
  • Netbeans : NetBeans IDE 8.2

Update

When Opening the database with console.bat ( by the way, this file is located in UcanAccess download folder) I got the follwoing warnings/errors :

WARNING:Looking for usage map at page 9093, but page type is 1

Cannot load procedure Query4 user lacks privilege or object not found: [My Table Name]

Cannot resolve table [My Table Name]

tom johnes
  • 387
  • 1
  • 3
  • 12
  • Try opening the database file using console.bat or console.sh and see if you get any warnings about that table. – Gord Thompson May 10 '18 at 18:03
  • @GordThompson Awesome tip... I Did not know about `console.bat`... I did it and I wrote the messages in my OP... My table, though present in Access, is not among the tables loaded by `console.bat` – tom johnes May 10 '18 at 18:24
  • 1
    Sounds like your database file might be slightly damaged. Make a backup for safety and then open it in Access and try doing a Compact and Repair Database on it. – Gord Thompson May 10 '18 at 18:44
  • @GordThompson Yes!!! This solved the issue. Everything works fine now... May I ask how you figured this out from the info I gave you ? Also you can add this as an answer and I will accept it – tom johnes May 10 '18 at 19:24
  • Possible duplicate of [Warning: Looking for usage map at page 1774, but page type is 1 in UCanAccess](https://stackoverflow.com/questions/28463234/warning-looking-for-usage-map-at-page-1774-but-page-type-is-1-in-ucanaccess) – jtahlborn May 22 '18 at 14:08

1 Answers1

3

WARNING:Looking for usage map at page 9093, but page type is 1

strongly suggests a damaged database file. Jackcess, the record manager used by UCanAccess, retrieved a page (block) of data from the file expecting it to be tagged as a "usage map" but it was tagged as something else.

The most common solution for a damaged database file is to open it in Access and then do a "Compact and Repair Database" operation on it.

Gord Thompson
  • 116,920
  • 32
  • 215
  • 418