Kbase P18657: Can not run Java stored procedures
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  23/06/2010 |
|
Status: Unverified
FACT(s) (Environment):
Progress 9.x
SYMPTOM(s):
Can not run Java stored procedures
[JDBC Progress Driver]:error in compiling the stored procedure
Stored procedure fails when field used in SQL statement contains hyphen character "-"
Field with hyphens is enclosed in double quotes (")
CAUSE:
The double quotes are not being interpreted correctly as part of the Java statement.
FIX:
In order for the JDBC driver to interpret the quotes surrounding the field name correctly and not as part of the Java statement used in the execution of the SQL statement, the escape character \ should precede the "
i.e.
CREATE PROCEDURE sales6()
BEGIN
SQLIStatement Insert_sales6 =
new SQLIStatement("INSERT INTO pub.salesperson(\"sales-id\",name)
values('88', 'testsql') ");
Insert_sales6.execute();
END