Skip to Content
0
Former Member
Jul 14, 2008 at 06:13 PM

Exception: Call of execute(String) is not allowed for PreparedStatement

37 Views

Hi all,

This query was run fine on SapDB 7.4 from Jave code using prepareStatement() method:

declare id11216053819634 cursor for select sc.name, measuredobjectid id from serviceconditions sc, measuredobjects mo where sc.collectionid = mo.collectionid and sc.name like 'DWindowsSLA/%,%,%,%' for reuse

declare id21216053819634 cursor for select min(sampletime), max(sampletime), name, id11216053819634.id from id11216053819634, d_slastore ss where id11216053819634.id = ss.measuredobjectid and ss.sampletime between '2008-07-14 00:00:00' and '2008-07-14 12:43:35' group by name, id11216053819634.id for reuse

select ss.status, ss.statuschange, ss.sampletime, id21216053819634.name from d_slastore ss, id21216053819634 where ss.measuredobjectid = id21216053819634.id and ss.sampletime between '2008-07-14 00:00:00' and '2008-07-14 12:43:35' and (statuschange != 0 or ss.sampletime = id21216053819634.expression1 or ss.sampletime = id21216053819634.expression2) order by name, sampletime

We recently upgrade our old SapDb to the latest MaxDB. An now this query produces the error:

com.sap.dbtech.jdbc.exceptions.JDBCDriverException: SAP DBTech JDBC: Call of execute(String) is not allowed for PreparedStatement.

Does anyone know how to fix this?

Thank you very much,

Irina