If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > db2 v8FP4 Win2kProf: User defined type in stored proc not working

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-05-04, 07:33
deepaka deepaka is offline
Registered User
 
Join Date: Jan 2004
Posts: 20
db2 v8FP4 Win2kProf: User defined type in stored proc not working

Hi All,

Whta's wrong with:

CREATE PROCEDURE ADMINISTRATOR.typeProc(out retVal myType)
------------------------------------------------------------------------
-- SQL Stored Procedure
------------------------------------------------------------------------
BEGIN
declare myObj myType;
set myObj.ame = 'deepak';
set myObj.age = 10;
set retVal = myObj;
END@

where myType is declared as:
create type myType (nam varchar(20), age int) mode db2sql.
The error I get is:
The data type for parameter or variable "retVal" is not supported in the SQL routine.
Same is the case with myObj if I remove the out parameter.


Regards,
Deepak Ajmera
Reply With Quote
  #2 (permalink)  
Old 02-05-04, 11:09
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Deepak,
According to the SQL Reference manual, User Defined Datatypes are not supported for parameters.

Andy
Reply With Quote
  #3 (permalink)  
Old 02-06-04, 00:52
deepaka deepaka is offline
Registered User
 
Join Date: Jan 2004
Posts: 20
Thank You

Regards,
Deepak Ajmera
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On