Hi, 
    I have the following java code

    String sqlString="select ? from dual";
    PreparedStatement st= cn.prepareStatement(sqlString);
    st.setString(1,"a");
   
    ResultSet rs=st.executeQuery();

Running the code, with MaxDb 7.5.01.00, I get the error "Parameter spec not allowed in 
this context".

I found a workaround by using this query:  "select '' || ? from dual".
It seems that it cannot recognize the type of the parameter, so it is necessary to 
tell the kernel the type.
The same thing happens with numbers (select 0+? from dual).

Is it a known behaviour or not?

Thanks 
Fabio Pinotti

Reply via email to