Problem with Calling Stored Procedure

Hutch619

New Member
I am able to create the basic "Hello World" Stored Procedure just fine. The problem is when I try to call it.

This is what I've done.

Created Table
@echo true;
@autocommit true;
CREATE TABLE PUB.HelloWorld(
fld1 char(20)
);
COMMIT WORK;



Created Stored Procedure
@echo true;
@autocommit true;
CREATE PROCEDURE PUB.spHelloWorld ()

BEGIN
SQLIStatement Insert_HelloWorld = new SQLIStatement (
"INSERT INTO PUB.HelloWorld(fld1) values ('Hello World!')");
Insert_HelloWorld.execute();
END;
COMMIT WORK;


Call Stored Procedure
@echo true;
@autocommit true;
CALL PUB.spHelloWorld();
Commit;


This is the output I get back
=== Statement 1. ===
@echo true
Ok: Echo true. (8932);

=== Statement 2. ===
@autocommit true
Ok: AutoCommit true. (8932);

=== Statement 3. ===
CALL PUB.spHelloWorld();
=== SQL Exception 1 ===
SQLState=HY000
ErrorCode=-210022
[JDBC Progress Driver]:.

Errors 1.
=== Statement 4. ===
Commit;


Statements: 4; Updates 0; Rows 0; Errors: 1; Warnings: 0. (8926)

ANY IDEAS? :confused:
 
Maybe this helps:

KBP8029:
Status: Verified
FACT(s) (Environment):
Windows NT 32 Intel/Windows 2000
Progress 9.1D
Progress 9.1C
Progress 9.1B
SYMPTOM(s):
SQL-92 Stored Procedure and Trigger returns an error when executed.
SQL Exception:
SQLState=HY000
ErrorCode=-20211
[JDBC Progress Driver]:
Error -210022 when running SQL-92 stored procedure or trigger.
210022 DataDirect Technology Progress ODBC driver failed during
dynamic load of
Java dynamic library resend 126.
The SQL-92 Stored Procedure and Trigger compiled without errors.
CAUSE:
The shared library path has to include the correct paths for the JAVA
JVM library or DLL.
FIX:
Before starting the Database, set the PATH as follows :
set PATH=%DLC%\jre\bin\hotspot;%PATH%

HTH,

Casper.
 
syntax

Progress OpenEdge syntax here.

RUN procedureName IN THIS-PROCEDURE /* some handle */.

DEFINE PROCEDURE procedureName.
/* block here */
message 'Hello World' VIEW-AS ALERT-BOX .
END PROCEDURE.
 
Back
Top