cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC Adapter issues with ' Character

Former Member
0 Kudos

HI Folks

I have 2 issues/questions

1. The database(Firebird) I am attempting to INSERT records to expects the format

INSERT INTO konp (KNUMH, KSCHL) values(0001094056, 'ZFPD')

but XI generates

INSERT INTO konp (KNUMH, KSCHL) values('0001094056', 'ZFPD')

THe difference is the inverted commas on the value of the first element

How can I remove these inverted commas?

2. I have added attribute logSQLStatement to the adapter, In the audit log I expect to see the entire SQL statement but only get INSERT INTO konp () VALUES ()

Is this normal? The payload looks fine, see below

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

- <ns0:FB_Konp xmlns:ns0="urn:distell:xi:roffice:enterpriseagent">

- <InsertStatement>

<konp action="INSERT" />

- <access>

<KNUMH>'0001094055'</KNUMH>

<KSCHL>ZFPD</KSCHL>

<STFKZ>A</STFKZ>

<KZBZG />

<KSTBM>0.000</KSTBM>

<KONMS />

<KSTBW>0.00</KSTBW>

<KONWS />

<KRECH>C</KRECH>

<KBETR>-1.00</KBETR>

<KONWA>ZAR</KONWA>

<KPEIN>1</KPEIN>

<KMEIN>CS</KMEIN>

<LOEVM_KO />

</access>

</InsertStatement>

</ns0:FB_Konp>

Thanks for any help received

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Thanks Jai for you effort

Former Member
0 Kudos

Hi,

Please check the structure , and the type of the first field,is it string..?? then it may be in quotes..

Seond one you are getting the correct payload values..

..

To see the structure of JDBC see below link

http://help.sap.com/saphelp_nw2004s/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm

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

Regards

Chilla..

<i>Points if it is helpfull..</i>

Former Member
0 Kudos

Hi,

Also Check Note: 988604

Regards,

Sudharshan

Former Member
0 Kudos

Issue 1:

Try using the attribute <b>hasQuot</b>

Ref: http://help.sap.com/saphelp_nw2004s/helpdata/en/22/b4d13b633f7748b4d34f3191529946/frameset.htm

<i> hasQuot= YES|NO During construction of the WHERE condition of the SQL statement, the table column type determines whether the default is to set the values in quotation marks (text column types) or not (numerical column types). In a few cases (for example, when using functions), it may be necessary to override this. This attribute enables you to do this. If YES, quotation marks are always set round the values for which this attribute is set in the SQL syntax. If NO, quotation marks are never set. Only use this attribute in individual cases.</i>

Regards,

Jai Shankar

Former Member
0 Kudos

HI

I am afriad that is only valid for element in the <KEY> and that is not allowed for a INSERT statement

Any other ideas?

Thanks

Former Member
0 Kudos

Henry,

I guess I was wrong. I don't have a db acces now to check this.

But do you get any error if XI generates

<b>INSERT INTO konp (KNUMH, KSCHL) values('0001094056', 'ZFPD')</b>?

We have used similar statements with out a problem.

Regards,

Jai Shankar

Former Member
0 Kudos

HI Jai

It is a problem, but I think I just found a possible workaround

I was getting error

Unable to execute statement for table or stored procedure. 'konp_landing' (Structure 'InsertStatement') due to org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544569. Dynamic SQL Error SQL error code = -104 Token unknown - line 1, column 28 )

With reards to my other question have you used the additional parameter logSQLStatement in your JDBC adapter, does the full SQL statement appear in the audit log?

Thanks and Regards

Henry

Former Member
0 Kudos

Henry,

>>With reards to my other question have you used the additional parameter logSQLStatement in your JDBC adapter, does the full SQL statement appear in the audit log?

I have used this parameter and I got the full query in the log with out a problem.

Regards,

Jai Shanakr