Consultor Eletrônico



Kbase 44982: Example in page 5-25 of the SQL-92 Guide and Reference cannot compile
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   22/06/2001
Solution ID: P14982

FACT(s) (Environment):

Progress 9.1D
Progress 9.1C
Progress 9.1B

SYMPTOM(s):

Example in page 5-25 of the SQL-92 Guide and Reference cannot compile

Error in compiling the stored procedure

CAUSE:

Documentation Bug

FIX:

The corrected version of the example in the Documentation is the following :

CREATE PROCEDURE get_sal2 ()
IMPORT
import java.math.BigDecimal;
BEGIN
StringBuffer ename = new StringBuffer (20) ;
BigDecimal esal = new BigDecimal (2) ;
SQLCursor empcursor = new SQLCursor ( "SELECT Name, Cust-Num FROM pub.Customer" ) ;
empcursor.open () ;
do
{
empcursor.fetch ();
if (empcursor.found ())
{
ename = (StringBuffer) empcursor.getValue (1, CHAR);
esal = (BigDecimal) empcursor.getValue (2, NUMERIC);
}
} while (empcursor.found ()) ;
empcursor.close () ;
END