cancel
Showing results for 
Search instead for 
Did you mean: 

Error while inserting records in database

Former Member
0 Kudos

Hi,

I am trying to insert records in database using stored procedure but while testing the interface I am getting below error:

Error processing request in SAX parser: Error while executing statement for table/stored proc. ‘SP_InsertData’ (structure ‘Statement’):com.microsoft.sqlserver.jdbc.SQLServerException: Error converting data type nvarchar to int.

Can anyone please help me in solving this issue?

Regards

Vasant

Accepted Solutions (1)

Accepted Solutions (1)

former_member440061
Participant
0 Kudos

Hi,

This mighht be due to the mimatch between the "types"  of fields that are maintained at Db end and those you have maintained. Please check.

Answers (5)

Answers (5)

Former Member
0 Kudos

Hello Vasant,

  If you got the solution then rewards point and close the threads....

Best Regards,

Anirban

Former Member
0 Kudos

Hi Vasant,

  In the receiver JDBC adapter go to adavnce Tab and add LogSQLStatement equals to true.
which enables you to see more logging details.

  

Also check the sequence of the stored procedure and Table structure(data type).
  also try to check the test data and try inserting manualy in the database.

Regards,

Anirban

Former Member
0 Kudos

Hi Vasant,

Also check if you are passing records to SP in sequence as per stored procedure declaration in DB.

Regards,

Pranav

Former Member
0 Kudos

Hi Vasant,

Check if the stored procedure is created as per the standard structure.

http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm

Check if the values created in PI are compatible with Ms Sql table cols.

You should be passing varchar to a Integer field. check it with sql team.

Regards,

Pranav

former_member184720
Active Contributor
0 Kudos

I think you have to use hasQuot attribute for the fields which are defined as nvarchar type in the database.

Also check for Amit's reply in the below thread

http://scn.sap.com/thread/3161812