• 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
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

Problem with a MS Access database  RSS feed

 
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: 5931
155
Chrome Eclipse IDE Java Postgres Database Ubuntu VI Editor
  • 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: 5931
155
Chrome Eclipse IDE Java Postgres Database Ubuntu VI Editor
  • 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.
 
Saloon Keeper
Posts: 20655
122
Android Eclipse IDE Java Linux Redhat Tomcat Server
  • 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: 5931
155
Chrome Eclipse IDE Java Postgres Database Ubuntu VI Editor
  • 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
Saloon Keeper
Posts: 20655
122
Android Eclipse IDE Java Linux Redhat Tomcat Server
  • 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.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!