on 07-14-2008 7:13 PM
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
Hi Irina,
First, welcome to SDN!
Well, PreparedStatement represents a precompiled SQL statement, so you should be using the no-arg execute() method rather than execute(String).
HTH!
\-- Vladimir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.