cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC / XML-SQL and Unicode

Former Member
0 Kudos

Hi

When trying to write Unicode data with the JDBC adapter into a table on sql server, the data will show up like "?????" in the table.

Normally the "N" prefix should be specified for Unicode fields e.g. N'ABC', but I have not found a way to do this with action "UPDATE_INSERT".

I would like to avoid using the "SQL_DML" action.

Does anyone know how this could be done?

Thanks.

John

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

The documentation is not very clear on the use of "hasQuot".

But I gave it a try and it works. Thanks for the tip.

The "sendStringParameterAsUnicode" parameter is by default set to true, however this does tell the sql server to do unicode conversion on the specific field.

John

Former Member
0 Kudos

Hi,

Try something like this :

<StatementName>

<dbTableName action="UPDATE_INSERT">

<table>realDbTableName</table>

<access>

<col1 hasQuot="no">N'ABC'</col1>

</access>

<key>

<col2>...</col2>

</key>

</dbTableName>

</StatementName>

Using this hasQuot="No" will tell the SAX parser not to automatically enclosed value between quotes (otherwise it would create something like this : col1 = 'N'ABC'')

There maybe some driver settings that could also do the trick (like sendStringParameterAsUnicode) but I'm not sure they can be used in XI

Hope this helps

Chris