Error running OE Prepared Statement

Posted by Admin on 23-Dec-2008 06:24

Hi all,

I have been trying to run OpenEdge Prepared Statements in Sonic, but having some weird problems.

My query is as under:

insert into pub.transactions(tranamt,trantype,traaccid,tradate) values(@amount,'CREDIT',@transferer,'2008-12-21');

Here the parameters preceded by '@' are to be supplied at runtime by Sonic.

However at runtime due to some reasons the parameters are not replaced by actual values.

Interesting fact is that if I used a single input parameter in place of two, the query would run successfully.

I guess there is some configuration needed to be set for OpenEdge Driver to work for more than 1 input parameter.

Also, I have tried the same with other databases. There is no such issue.

Any help would be appreciated,

Thank you

All Replies

Posted by Admin on 24-Dec-2008 21:32

LOL,

The OpenEdge SQL doesn't accept a ; at the end,

Also found an issue with OpenEdge 10.1B with similar problem,

Issue Number: OE00151223

SQL query throws "No Params allowed in select list" error

Executing an SQL query via a JDBC PreparedStatement generates the error:

No Params allowed in select

list

Reference:

http://www.psdn.com/library/servlet/KbServlet/download/4296-102-10122/readmesp_101b03.pdf

This thread is closed