Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Posts
    20

    Unanswered: 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

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Deepak,
    According to the SQL Reference manual, User Defined Datatypes are not supported for parameters.

    Andy

  3. #3
    Join Date
    Jan 2004
    Posts
    20
    Thank You

    Regards,
    Deepak Ajmera

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •