I don't understand why I am getting this error Exception in thread "main" net.ucanaccess.jdbc.UcanaccessSQLException: UCAExc:::4.0.2 user lacks privilege or object not found: MICHAEL
My code is:
Stringname="Michael";rs=s.executeQuery("SELECT [FirstName], [LastName] FROM ["+DBTableName+"] WHERE [FirstName]="+name);["+DBTableName+"]WHERE[FirstName]="+name);rs.next();table.addCell(rs.getString(1));table.addCell(rs.getString(2));while(rs.next()){table.addCell(rs.getString(1));table.addCell(rs.getString(2));}
Thanks!
Last edit: Michael Schwamborn 2017-12-07
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I don't understand why I am getting this error
Exception in thread "main" net.ucanaccess.jdbc.UcanaccessSQLException: UCAExc:::4.0.2 user lacks privilege or object not found: MICHAELMy code is:
Thanks!
Last edit: Michael Schwamborn 2017-12-07
The sql is malformed: name should be enclosed between quotes
....WHERE [FirstName]='"+ name+"'")
Thanks!