Hi,
I have this simple piece of java code that gives me an error (it is just a dummy
slq expresson that include the error I get on a more complex query...):
String sqlString="Select 1 FROM DUAL WHERE
" DECODE(?,'1','ONE','NOT_ONE')='ONE'" +
" AND ?='guest'";
PreparedStatement st= cn.prepareStatement(sqlString);
st.setObject(1,"0");
st.setObject(2,"guest");
ResultSet rs=st.executeQuery();
The error is
javax.servlet.ServletException: SAP DBTech JDBC: Parameter 1: value too large.
The connection seems to be valid, because I succesfully execute other sql commands.
The strange thing is that the following statement, executed with the same code above,
runs succesfully
String sqlString="Select 1 FROM DUAL WHERE " +
" ?='1'" +
" AND ?='guest'";
so it seems that the problem is raised by "decode"....
I tried to specify parameter types, or to use setString instead of setObject, but
nothing changes.
Thanks
Fabio