Nick Han wrote:
> You need the ref cursor. "types.cursorType"---don't take this out.
>
>
>>> studentInfo types.cursorType;
>
>
> did you declare "types.cursorType" in the package spec?, and it has to be a ref cursor type!
>
> example: TYPE cursorType IS REF CURSOR; <===== you need this line in the package spec or else it will not work!
>
> again, it looks like you need to wrap this procedure in a package and invoke it through Cold Fusion via [package_name.procedure_name] in the storeproc tag.
Yep, I've got a package called dlc and this procedure is part of the
package body; I invoke the procedure with
"dlc.test_dlc_sp_getstudentinfo". types.cursorType is defined as a ref
cursor in the package called "types".
> Nick Han
>
>
>>>>[EMAIL PROTECTED] 03/08/04 03:35PM >>>
>
> It yields this error:
>
> Variable GETNAME is undefined
>
> Rob wrote:
>
>>what does
>><cfdump var="#getName#">
>>yield?
>>
>>On Mon, 2004-03-08 at 15:25, Richard Crawford wrote:
>>
>>
>>>Well, I altered the stored procedure as follows:
>>>
>>>=========================================
>>>PROCEDURE test_dlc_sp_getStudentInfo (
>>> studentID IN number
>>>
>>> )
>>>
>>> as
>>>
>>> studentInfo types.cursorType;
>>>
>>> sFirst varchar2(50);
>>> sLast varchar2(50);
>>> sOrient char(1);
>>>
>>> begin
>>>
>>> open studentInfo for
>>> select
>>> sFirst,
>>> sLast,
>>> sOrient
>>> from
>>> tblStudentInfo
>>> where
>>> sid = studentID;
>>>
>>>CLOSE studentInfo;
>>>
>>> END test_dlc_sp_getStudentInfo;
>>>=========================================
>>>
>>>Essentially, I removed the studentInfo ref cursor from the parameter list.
>>>
>>>Now, I run the Cold Fusion page, and the "Unsupported Data Conversion"
>>>error message is gone. Woo hoo!
>>>
>>>However, if I call the Stored Procedure from Cold Fusion like this:
>>>=========================================
>>><cfstoredproc datasource="DLCampus"
>>>procedure="dlc.test_dlc_sp_getStudentInfo">
>>> <cfprocparam type="in" value="1881" cfsqltype="cf_sql_decimal">
>>> <cfprocresult name="getName">
>>></cfstoredproc>
>>>=========================================
>>>
>>>I would hope that I could get at the value of sOrient like this:
>>>
>>><cfoutput>#getName.sOrient#</cfoutput>
>>>
>>>Unfortunately, now I get a new error:
>>>=========================================
>>> Element SORIENT is undefined in GETNAME
>>>=========================================
>>>
>>>I don't know if I'm making progress or not.
>
>
>
--
Richard S. Crawford
Programmer III,
UC Davis Extension Distance Learning Group (http://unexdlc.ucdavis.edu)
(916)327-7793 / [EMAIL PROTECTED]
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
- Re: Cold Fusion and Oracle Richard Crawford
- Re: Cold Fusion and Oracle Rob
- Re: Cold Fusion and Oracle Richard Crawford
- Re: Cold Fusion and Oracle Nick Han
- Re: Cold Fusion and Oracle Janet Schmitt
- Re: Cold Fusion and Oracle Richard Crawford
- Re: Cold Fusion and Oracle Janet Schmitt
- Re: Cold Fusion and Oracle Richard Crawford
- Re: Cold Fusion and Oracle Janet Schmitt
- Re: Cold Fusion and Oracle -- RESOLVED Richard Crawford
- RE: Cold Fusion and Oracle Richard Crawford
- RE: Cold Fusion and Oracle Stacy Young
- RE: Cold Fusion and Oracle Stacy Young
- Re: Cold Fusion and Oracle Richard Crawford
- Re: Cold Fusion and Oracle Adrocknaphobia
- Re: Cold Fusion and Oracle sampath nellutla
- Re: Cold Fusion and Oracle sampath nellutla
- Re: Cold Fusion and Oracle Richard Crawford
- Re: Cold Fusion and Oracle sampath nellutla