cancel
Showing results for 
Search instead for 
Did you mean: 

Native SQL string in Receiver JDBC

Former Member
0 Kudos

Hi All,

I have a requirement where in i have to make us of message protocol : Native SQL String .

SDN explanation is as follow :

When inserting a line into a table the corresponding document looks as follows:*

"INSERT INTO tableName (column-name1, column-name2, column-name3) VALUES(u2018column-value1u2019, u2018column-value2u2019, u2018column-value3u2019) "

I tried to pass the data as shown below :

<?xml version="1.0" encoding="UTF-8"?>

<ns0:MT_SrcProxy xmlns:ns0="http://infosys.com/pi/projects/pepsi/n1">

<Record>

<input> "INSERT INTO Emp (EmpNO,FirstName,LastName,DOJ,BaseLocation)VALUES('103','abc','xyz','NULL','Blore')" </input>

</Record>

</ns0:MT_SrcProxy>

I am getting the following error in communication channel :

Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error 'com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near '<'.' executing service raw2sql with SQL statement '<?xml version="1.0" encoding="UTF-8"?> <ns0:MT_SrcProxy xmlns:ns0="http://infosys.com/pi/projects/pepsi/n1"> <Record> <input>"INSERT INTO Emp (EmpNO,FirstName,LastName,DOJ,BaseLocation)VALUES('103','abc','xyz','NULL','Blore')"</input> </Record> </ns0:MT_SrcProxy>'

Can anyone please help me in this regard

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member10771
Active Participant
0 Kudos

Hi,

Can you please elaborate on this .. I mean are you facing some issue in Receiver communication channel or is there some issue with the SQL query

Former Member
0 Kudos

Hi Amit,

I am getting error in Receiver Channel.

Regards

Vinay P.

former_member10771
Active Participant
0 Kudos

Hi Vinay,

I have not tried on this but looks like the output that needs to be passed must be a Non XML and not an XML output.

Please refer this thread to get more clear idea on this.

.

Thanks

Amit