• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Problem with a MS Access database

 
Ranch Hand
Posts: 443
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have been using UCanAccess for years in a Java application, but recently I have been getting  an error with a Select statement:

net.ucanaccess.jdbc.UcanaccessSQLException: UCAExc:::4.0.4 user lacks privilege or object not found: MGR

The following code is not from the application but gives the same error.

It appears that the problem is with the value "mgr" because "SELECT * FROM user" works fine. The code has been working for years; I started getting this error two days ago. I have not been able to find any solution in the Internet.
 
Sheriff
Posts: 6108
157
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would try
but I'm no Access expert.
 
Alejandro Barrero
Ranch Hand
Posts: 443
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have been using UCanAccess for years in a Java application, but recently I have getting  an error with a Select statement:

net.ucanaccess.jdbc.UcanaccessSQLException: UCAExc:::4.0.4 user lacks privilege or object not found: MGR

The following code is not from the application but gives the same error. It appears that the problem is with the value "mgr" because "SELECT * FROM user" works fine. The code has been working for years; I started getting this error two days ago. I have not been able to find any solution in the Internet.
 
Knute Snortum
Sheriff
Posts: 6108
157
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible that someone has changed the privileges on the Access DB?  Do you have administrative privileges?  
 
Alejandro Barrero
Ranch Hand
Posts: 443
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply Knute; The application has been working as is for years, apparently Microsoft has made changes and my computer has just received them. It is regrettable that I have to change many lines of code, but I can make it work again.
 
Alejandro Barrero
Ranch Hand
Posts: 443
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working on my personal computer and nobody else uses it. I think that Microsoft made the changes and my computer updated itself.
 
Bartender
Posts: 20924
127
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have presented the SELECT statement in 2 different ways:
and

The first statement has a very different meaning than the second one, and it's the kind of statement where I'd expect to see your message returned.
 
Alejandro Barrero
Ranch Hand
Posts: 443
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Tim; "user_name=mgr" has been working for years, but nowadays I have to use "user_name='mgr'", which I learned from Knute. I wish here was a way to continue using the old code.
 
Knute Snortum
Sheriff
Posts: 6108
157
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you looking for a column with the text "mgr", then the second way (with single-quotes) is valid SQL.  MS may have just "fixed" the way you wanted to do it, but that is the way that will work with every other DB.
 
Tim Holloway
Bartender
Posts: 20924
127
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah. Sounds more like Microsoft repaired a bug. You should have never been able to code it the other way to begin with. In most systems, an unquoted name is probably going to be interpreted as the name of a variable or table, not as a literal string.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!