cancel
Showing results for 
Search instead for 
Did you mean: 

Error in JDBC Receiver

Former Member
0 Kudos

Hi,

I get the following while sending a message using Java proxy to a SQL server using JDBC adapter :-

Name: ABC Password: SS Role: com.sap.aii.proxy.xiruntime.core.BaseProxyException: Error sending MS message. Exception: XIAdapterFramework:GENERAL:com.sap.aii.af.ra.ms.api.DeliveryException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'Users' (structure 'Statement'): java.sql.SQLException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?ABC' AND password='SS'' at line 1 com.sap.aii.proxy.xiruntime.core.BaseProxyException: Error sending MS message. Exception: XIAdapterFramework:GENERAL:com.sap.aii.af.ra.ms.api.DeliveryException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'Users' (structure 'Statement'): java.sql.SQLException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?ABC' AND password='SS'' at line 1

Can anybody help me in fixing this problem.

Thanks and Regards,

Jishi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

<i>server version for the right syntax to use near '?ABC' AND password=<b>'SS''</b> at line 1 com.sap.aii.proxy.xiruntime.core</i>

Looks like you have used wrong apostrophies in your syntax near the password value.

Regards,

Smitha.

Answers (1)

Answers (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Jishi,

Can you post us your destination datatype along with the content that is being passed to your JDBC adapter.

Are you passsing any specical characters as a part of your destination data type?

Also, the user id and password entered in your JDBC adapter are correct?

Regards,

Bhavesh

Former Member
0 Kudos

Hi Bhavesh,

The Destination Datatype:-

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

<ns1:user_db_mt xmlns:ns1="http://Optijava/receiver">

<Statement>

<Users action="SQL_QUERY">

<access>SELECT * FROM Users WHERE Username=’Soumya&apos; AND Password=&apos;SS&apos;</access>

<key><username>AA</username><password>BB</password>

</key></Users></Statement>

</ns1:user_db_mt>

Also in the JDBC adapter what is the value that i have to give in the <b>SQL Syntax parameters</b>

Escape symbol for apostrophe

Column Name Delimiter

I am using MySQL as the database.

Thanks,

Jishi

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Jishi,

You are trying to select something from your Database using SQL_QUERY.

In this case, you can give your exact SQL query of your database here.

Can you please tell us why <b>&pos</b> is being used??

Regards,

Bhavesh

Former Member
0 Kudos

Hi,

>Can you please tell us why &pos is being used??

the <b>&pos</b> is the '' that i have used in the select query in the where clause.

SELECT * FROM Users WHERE Username='AA'AND Password='SS'

Regards,

Jishi