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.   

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]

Reply via email to