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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Returning recordset from Oracle stored procedure...

Status
Not open for further replies.

moebius359

Programmer
Feb 7, 2002
4
0
0
US
Hi all,

If anyone can shed some light on this I would really appreciate. I've been looking at this for three days and can't come up with a valid reason as to why it would fail with a PLS-00306 in UltraDev, but run without returning a result on the server.

The environment is:

W2K Workstation w. Macromedia UltraDev 4.01
Apache 1.3.12 w. Chilisoft ChiliASP 3.5.2 ( ADO DB support)
Merant ODBC drivers for Oracle8
Database backend Oracle 8.1.6

Robin

Code:
############################################################
Here is the content of the procedure called by ASP page.

Should be simple two strings in, one number out.
############################################################

CREATE OR REPLACE PROCEDURE ultradev_test(pStr IN VARCHAR2,
				  pFormat IN VARCHAR2,
				  pNumber OUT NUMBER)

IS

BEGIN

  IF pFormat IS NULL THEN
    pNumber := TO_NUMBER(pStr);
  ELSE
    pNumber := TO_NUMBER(pStr, pFormat);
  END IF;

  EXCEPTION

  WHEN OTHERS THEN
    pNumber := NULL;

END;
/
Code:
############################################################
Here is the content of the ASP page used to test the procedure.
############################################################

<%@LANGUAGE=&quot;VBSCRIPT&quot;%>
<!--#include file=&quot;../../Connections/onlineBilling_test.asp&quot; -->

<%

Dim strNumber
	strNumber = &quot;00012345.67&quot;
Dim strFormat
	strFormat = &quot;99999.99&quot;

%>

<%

Dim getNumber__pValue
getNumber__pValue = &quot;&quot;
if(strNumber <> &quot;&quot;) then getNumber__pValue = strNumber

Dim getNumber__pFormat
getNumber__pFormat = &quot;&quot;
if(strFormat <> &quot;&quot;) then getNumber__pFormat = strFormat

%>

<%

set getNumber = Server.CreateObject(&quot;ADODB.Command&quot;)
getNumber.ActiveConnection = MM_onlineBilling_test_STRING
getNumber.CommandText = &quot;robin_b.ultradev_test&quot;
getNumber.Parameters.Append getNumber.CreateParameter(&quot;pValue&quot;, 200, 1,12,getNumber__pValue)
getNumber.Parameters.Append getNumber.CreateParameter(&quot;pFormat&quot;, 200, 1,12,getNumber__pFormat)
getNumber.Parameters.Append getNumber.CreateParameter(&quot;pNumber&quot;, 5, 2)
getNumber.CommandType = 4
getNumber.CommandTimeout = 120
getNumber.Prepared = true
set newValue = getNumber.Execute()

%>

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;>
</head>

<body bgcolor=&quot;#FFFFFF&quot; text=&quot;#000000&quot;>

<table>
  <tr>
    <td><%=(newValue.Fields(&quot;pNumber&quot;).Value)%></td>
  </tr>
</table>
</body>
</html>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top