The UCanAccess list of features includes this: "You can execute select queries defined and saved in Access". This sounds like it supports stored procedures, but when I try something like connection.prepareCall("{call calculateStatistics(?, ?)}" I get a "Feature Not Supported" exception.
Is there some other way to call a stored procedure (with parameters) via UCanAccess?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Chardy,
your question is interesting.
UCanAccess maps select queries defined in MS Access into views when they are convertible into (so when they are SELECT queries without parameters).
It also implements the same functions provided by the MS environment so that they are callable by a select query defined in access or "online".
ResultSet rs=st.executeQuery("SELECT IIf(descr='Show must go off','tizio','caio&sempronio'&'&Marco Amadei'&' '&now()& RTRIM(' I''m proud of you ')) from example1");
ResultSet rs=st.executeQuery("select id, DCount('*','t234','1=1') from t234");
It also supports user defined functions, as explained in UCanAccess web site.
BUT
It cannot execute ms-access parametric queries that could only be mapped into Callable Statements.
In other words, you have currently to code in java an equivalent procedure (using Prepared Statements).
The support for Callable Statements, where possile, will be added in the next versions and I think I'll put some more effort for this.
If you use the UCanAccess console you can see what UCanAccess can currently load.
Cheers Marco
Last edit: Marco Amadei 2014-04-28
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The UCanAccess list of features includes this: "You can execute select queries defined and saved in Access". This sounds like it supports stored procedures, but when I try something like connection.prepareCall("{call calculateStatistics(?, ?)}" I get a "Feature Not Supported" exception.
Is there some other way to call a stored procedure (with parameters) via UCanAccess?
Hi Chardy,
your question is interesting.
UCanAccess maps select queries defined in MS Access into views when they are convertible into (so when they are SELECT queries without parameters).
It also implements the same functions provided by the MS environment so that they are callable by a select query defined in access or "online".
ResultSet rs=st.executeQuery("SELECT IIf(descr='Show must go off','tizio','caio&sempronio'&'&Marco Amadei'&' '&now()& RTRIM(' I''m proud of you ')) from example1");
ResultSet rs=st.executeQuery("select id, DCount('*','t234','1=1') from t234");
It also supports user defined functions, as explained in UCanAccess web site.
BUT
It cannot execute ms-access parametric queries that could only be mapped into Callable Statements.
In other words, you have currently to code in java an equivalent procedure (using Prepared Statements).
The support for Callable Statements, where possile, will be added in the next versions and I think I'll put some more effort for this.
If you use the UCanAccess console you can see what UCanAccess can currently load.
Cheers Marco
Last edit: Marco Amadei 2014-04-28