Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

error building store procedures

Status
Not open for further replies.

elenaf

Programmer
Dec 18, 2002
2
IT
I have installed IBM DB2 Universal Database Version 7 with fixpack 7 and Store Procedure Builder.
I have also installed Microsoft Visual C++ .NET

In Store Procedure Builder I created this procedure:
CREATE PROCEDURE DB2ADMIN.Prova ( )
RESULT SETS 1
LANGUAGE SQL
P1: BEGIN
-- Declare cursor
DECLARE cursor1 CURSOR WITH RETURN FOR
SELECT * FROM DB2ADMIN.PERSON;

OPEN cursor1;
END P1

when i build it, the following error message appears:

DB2ADMIN.PROVA - Create stored procedure returns -901.

DB2ADMIN.PROVA: [IBM][CLI Driver][DB2/NT] SQL0901N The SQL statement failed because of a non-severe system error. Subsequent SQL statements can be processed. (Reason "call to sqloopen failed".) SQLSTATE=58004

DB2ADMIN.PROVA - Changes rolled back.

DB2ADMIN.PROVA - Build failed.

Can someone help me and tell me why this error appears?
Thanks in advance.
Elena

 
Hi Elena,
Set the following registry variable
"DB2_SQLROUTINE_COMPILER_PATH"
as below

db2set DB2_SQLROUTINE_COMPILER_PATH="D:\Micros~1\vc98\bin\vcvars32.bat"

it should point to vcvars32.bat.

Then build the stored proc.

hope it will work.

Sandip
 
Thanks for the answer but it still doesn't work.
I found vcvars32.bat file in this path:
D:\Program Files\Microsoft Visual Studio .NET\Vc7\bin

Does it not work becouse I installed Microsoft Visual Studio .NET?

By
Elena
 
Hi Elena

I had the same problem. A new installation of the runtime client was the resolution.

Regards Peter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top