Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> I need help on: Stored procedure calls from a C++ program (using Rogue Wave DBTools.h++)

I need help on: Stored procedure calls from a C++ program (using Rogue Wave DBTools.h++)

From: Jordi G-Ramallo <ramallo_at_ihg.net>
Date: 1997/03/02
Message-ID: <331973A8.7FC2@ihg.net>#1/1

Hi,

I'm developing an Oracle Cartridge using Rogue Wave Tools.h++(v6.1) and DBTools.h++(v1.1).
I execute stored procedures from the database that returns an string (maybe the result of a query or other stuff).

Here is the code used to call them:


	...
	RWDBStoredProc dbFn = my_database_var.storedProc(my_fn_name);
	RWCString ret_val_str;

	if (!dbFn.isValid()) {
		ret_val_str = "??????????";	
	}
	else {
		//dbFn << &ret_val_str;
		dbFn.execute(my_connection_var);
		//dbFn.fetchReturnParams();
		RWDBValue value = dbFn.returnValue();
		ret_val_str = value.asString();
	}
	...
----------------------------------------------------------------------

And here is an example of one of such procedures:



FUNCTION userTypeSelectOptions RETURN VARCHAR2 IS
	CURSOR userTypeC IS
		SELECT userTypeID, userType FROM userType;
	stro VARCHAR2(1000) := '';			-- Line 81
BEGIN
	FOR u_type IN userTypeC LOOP
		stro :=	stro || 
			'<li value="' || 
			u_type.userTypeID || 

'">' ||
u_type.userType; END LOOP; RETURN stro;

END userTypeSelectOptions;

The problem is that when I call the stored procedure from my cartridge using RogueWave DBTools API, I get an error from Oracle (reported by a DBTools error handler that I've installed).

The error message reported is:
Message: [SERVERERROR] Error from Server: ORA-06502: PL/SQL: numeric or value error ORA-06512: at "ADMCV.ACVHTMLTEMPLATE", line 81 (ADMCV.ACVHTMLTEMPLATE is the name of the package and the line number  is marked in the code above)

The same is true if I try it with a procedure with an in/out parameter (using the proper calling method).

I'll apreciate if you could say me what to do.

Thanks in advance

	Jordi G-Ramallo
	ramallo_at_ihg.net

Notes:
	- We are using Oracle 7.2 and Oracle WebServer 2.1
Received on Sun Mar 02 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US