Kbase P153493: Character string is too long (8184) with Stored Procedure
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  31/05/2011 |
|
Status: Verified
SYMPTOM(s):
Character string is too long (8184) with Stored Procedure
'Character string is too long' Exception returned when run a Stored Procedure with Character type input parameter
Stored Procedure used:
CREATE PROCEDURE getName1( IN from_city CHAR)
RESULT (
name CHARACTER(30)
)
BEGIN
String sname = "";
SQLCursor custcursor = new SQLCursor ("select name from pub.customer where city = ?");
custcursor.setParam (1, from_city);
custcursor.open ();
custcursor.fetch ();
while (custcursor.found())
{
sname = (String) custcursor.getValue(1, CHARACTER);
SQLResultSet.set (1, sname);
SQLResultSet.insert ();
custcursor.fetch();
}
custcursor.close ();
END
COMMIT WORK;
The SQL Width of the input parameter has been set up sufficiently in the database.
FACT(s) (Environment):
Windows
OpenEdge 10.x
CAUSE:
The default length for the CHAR data type is 1.
FIX:
Increasing the length of the input parameter to the stored procedure. For example:
CREATE PROCEDURE getName1(IN from_city CHAR(20))