cancel
Showing results for 
Search instead for 
Did you mean: 

How To Insert Unicode Data into SQL Tables Thru JDBC Receiver Channel ?

Former Member
0 Kudos

Hi Experts,

We have a Scenario wherein we download a large data from our SAP-HR module to one of the SQL server.

In this data there is one filed which is called the PHOTO which gives the Employee Photo data form HR to SQL server. (Jpg files converted data into binary at SAP side).

The SQL Server Version is 2008. wherein this data field has been defined as Varchar(max). In some cases the employee photo does not get uploaded properly. After investigation & logging a issue with MicroSoft, the MS expert suggested that the XI should insert the Unicode data into this field.

Following is the command extract given by MS expert.

INSERT statements: The INSERT statements by the SAP middleware statement should insert data in Unicode format:

-- Current INSERT statements

INSERT INTO staffdata (staffno, PHOTO) VALUES (00008601, 0xFFD8FFE0) --> Example 1

-- Required INSERT statements (note the "N" and the single quotes in the below)

INSERT INTO staffdata (staffno, PHOTO) VALUES (00008601, N'0xFFD8FFE0')

My question is how we can put this N followed by the actual value, since in XI the SQL command thru JDBC channels get forms as mentioned in example no. 1. Is there any setting in Communication Channel which will denote this as Unicode field.

Regards,

Umesh

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello.

Shouldn't you first define the PHOTO column as nvarchar instead of varchar - so the database will be able to contain the unicode data?

Also - check the communication channel at adapter engine monitoring to see what encoding does PI use for your data.

good luck,

Imanuel Rahamim.

Former Member
0 Kudos

Hi,

do you mean that in PI we dont have to do any changes...?

Regards,

Umesh