Openedge 10.0B SQL-92 Error while calling a compiled stored procedure
In SQL 92 for openedge 10.0B, I am getting an exception while calling the following stored procedure that compiles successfiully.
/***********************************************/
create procedure spcust (
in state varchar(2) not null,
in state_name varchar(15) not null,
in country varchar(6) not null
)
begin
String c1 = new String("state, ");
String c2 = new String("\"state-name\", ");
String c3 = new String("country ");
SQLCursor sItem = new SQLCursor
( "select " + c1 + " from pub.state where state = ?");
sItem.setParam (1, state);
sItem.open ();
sItem.fetch ();
if (! sItem.found() )
{
SQLIStatement iState= new SQLIStatement
( "INSERT INTO pub.state(" + c1 + c2 + c3 + ") values(?,?,?) " );
iState.setParam (1, state);
iState.setParam (2, state_name);
iState.setParam (3, country);
iState.execute();
}
end
commit work;
/***********************************************/
call spcust ('SA', 'San Mac', 'Italy');
commit work;
/**********************************************/
Error:
=== Statement 1. ===
call spcust ('SA', 'San Fra', 'India');
=== SQL Exception 1 ===
SQLState=
ErrorCode=-219901
[JDBC OpenEdge Driver]:[]Internal error -20152 (unknown sql92 error) in SQL from subsystem SQL92 function data_to_host called from stored_proc_t::execute on . for . Save log for Progress technical support.
Errors 1.
=== Statement 2. ===
commit work;
Statements: 2; Updates 0; Rows 0; Errors: 1; Warnings: 0. (8926)
Kindly let me know if you have any clue why this error occurs.
Thanks in Advance,
Sundreamz
In SQL 92 for openedge 10.0B, I am getting an exception while calling the following stored procedure that compiles successfiully.
/***********************************************/
create procedure spcust (
in state varchar(2) not null,
in state_name varchar(15) not null,
in country varchar(6) not null
)
begin
String c1 = new String("state, ");
String c2 = new String("\"state-name\", ");
String c3 = new String("country ");
SQLCursor sItem = new SQLCursor
( "select " + c1 + " from pub.state where state = ?");
sItem.setParam (1, state);
sItem.open ();
sItem.fetch ();
if (! sItem.found() )
{
SQLIStatement iState= new SQLIStatement
( "INSERT INTO pub.state(" + c1 + c2 + c3 + ") values(?,?,?) " );
iState.setParam (1, state);
iState.setParam (2, state_name);
iState.setParam (3, country);
iState.execute();
}
end
commit work;
/***********************************************/
call spcust ('SA', 'San Mac', 'Italy');
commit work;
/**********************************************/
Error:
=== Statement 1. ===
call spcust ('SA', 'San Fra', 'India');
=== SQL Exception 1 ===
SQLState=
ErrorCode=-219901
[JDBC OpenEdge Driver]:[]Internal error -20152 (unknown sql92 error) in SQL from subsystem SQL92 function data_to_host called from stored_proc_t::execute on . for . Save log for Progress technical support.

Errors 1.
=== Statement 2. ===
commit work;
Statements: 2; Updates 0; Rows 0; Errors: 1; Warnings: 0. (8926)
Kindly let me know if you have any clue why this error occurs.
Thanks in Advance,
Sundreamz