1
votes

I'm trying to do the following update using XPages Extension Library.

#{javascript:var mydata = {
      product: getComponent("inputProduct").getValue()
};

var params = [1, 2];,
@JdbcUpdate("mssql","table_name",mydata,"order_no=? AND order_line_no=?",params)};

I get the error:

Error while executing JavaScript action expression
Script interpreter error, line=6, col=1: Error while executing function '@JdbcUpdate'
Invalid column name 'PRODUCT'.

The problem is that XPages when it converts the JSON it puts product to PRODUCT.

Can you set the extension library to respect the case of the JSON and not convert to Uppercase? Or can anyone point to where this setting could be set if not the extension library?

Thanks

1
I'm not sure what's going on with changing the case, but I do know that mssql is not case senstive by default. Are you sure your table has that column? - Toby Samples
The database is a MS SQL Server with a case sensitive collation. We are pulling data from an existing application and can't change the collation. Just FYI. - Stanley_A

1 Answers

3
votes

The problem is com.ibm.xsp.extlib.util.JdbcUtil.appendColumnName()

public static void appendColumnName(StringBuilder b, String colName) { colName = colName.toUpperCase(); b.append(colName); }

This just needs changing to not upper case the variable.

There may be other methods that need changing if other variables are getting upper cased.