I'm trying to execute the follow SQL via preparedstatement in Java 8:
insert into ServiceResponse (fullname, first, last, address, zip, city,
make, model, vehyear, vin, [13832].rodate, ronum, parts, labor, type,
email) SELECT fullname, first, last, address, zip, city, make, model,
vehyear, vin, [13832].rodate,ronum, parts, labor, type, email FROM [13832]
INNER JOIN JOB ON ([13832].ADDRESS = JOB.address) AND (LEFT([13832].ZIP,5)
= LEFT(JOB.ZIP,5)) WHERE ((([13832].rodate)>#12/7/2016#) AND
(([13832].labortype='C') OR ([13832].labortype = 'W')));
And I'm getting the following error:
Cannot execute query! net.ucanaccess.jdbc.UcanaccessSQLException: UCAExc:::4.0.0 user lacks privilege or object not found: Z_13832
I have checked that the table 13832 exists in the Access database and I have the permissions to access it. I'm confounded by this strange "Z" that it is placing in front of the table name and am not sure why it is erroring out.
Any guidance would be appreciated.
Last edit: jessica nesler 2017-02-23
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That [13832].rodate in the column list of the INSERT INTO clause looks suspicious. If the [ServiceResponse] table has a [rodate] column then the reference should be to just rodate.
BTW, the Z_ prefix is added by UCanAccess when creating the HSQLDB backing database because HSQLDB does not allow table names to begin with a digit. The Access table is still named "13832" but the HSQLDB table is named "Z_13832" internally. (You should continue to refer to it as [13832].)
Last edit: Gord Thompson 2017-02-23
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello!
I'm trying to execute the follow SQL via preparedstatement in Java 8:
And I'm getting the following error:
Cannot execute query! net.ucanaccess.jdbc.UcanaccessSQLException: UCAExc:::4.0.0 user lacks privilege or object not found: Z_13832
I have checked that the table 13832 exists in the Access database and I have the permissions to access it. I'm confounded by this strange "Z" that it is placing in front of the table name and am not sure why it is erroring out.
Any guidance would be appreciated.
Last edit: jessica nesler 2017-02-23
That
[13832].rodate
in the column list of the INSERT INTO clause looks suspicious. If the [ServiceResponse] table has a [rodate] column then the reference should be to justrodate
.BTW, the
Z_
prefix is added by UCanAccess when creating the HSQLDB backing database because HSQLDB does not allow table names to begin with a digit. The Access table is still named "13832" but the HSQLDB table is named "Z_13832" internally. (You should continue to refer to it as [13832].)Last edit: Gord Thompson 2017-02-23
OH. Ah thank you! Going cross eyed looking at my own code!
And thank you for explaining the "z" prefix! I was so hopelessly confused by that!