One Star

SQLException with TOS 2.2.0GA_r6191

Hi everyone,
I have problem with the new TOS and the way sql queries are handled.
I'm using informix database and when I setup a componenent InfomixOutput, it generates the following statement:
"UPDATE \"" + "test" + "\" SET \"newColumn1\"=? WHERE \"newColumn\"=?"
--> which produce a syntax error:
Exception in component tInformixOutput_1
java.sql.SQLException: A syntax error has occurred.
at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:397)
and when I setup the very same thing with TOS 2.1.2, the statement is :
"UPDATE " + "test" + " SET b=? WHERE a=?"
in fact tInformixOutput_begin.javajet has change with the new version into this:

for(Column replacement:replacedColumns){
insertColName.append("\\\""+replacement.getName()+"\\\""+suffix);
insertValueStmt.append(replacement.getSqlStmt()+suffix);
if(!colStmt.getColumn().isKey()){
if(!firstNoneKey){
updateSetStmt.append(",");
}else{
firstNoneKey = false;
}
updateSetStmt.append("\\\""+replacement.getName()+"\\\"");
updateSetStmt.append("=" + replacement.getSqlStmt());
}else{
if(!firstKey){
updateWhereStmt.append(" AND ");
}else{
firstKey = false;
}
updateWhereStmt.append("\\\""+replacement.getName()+"\\\"");
updateWhereStmt.append("=" + replacement.getSqlStmt());
}
counterReplace++;
}

Am I completely WRONG?

Thanks for help Smiley Happy
1 REPLY
Employee

Re: SQLException with TOS 2.2.0GA_r6191

Hello,
Can you create a bug in our bugtracker please ?
Regards,