Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2014
    Posts
    294

    Unanswered: Wrapper dynamically

    Hi,

    I am trying to create a WRAPPER in a stored procedure. This is my code, This is throwing some error.
    Kindly correct me If I am wrong.
    CREATE PROCEDURE CREATE_ROUGH()
    LANGUAGE SQL
    BEGIN
    DECLARE EOF INT DEFAULT 0;
    DECLARE STMT VARCHAR(200);
    DECLARE CONTINUE HANDLER FOR NOT FOUND
    SET EOF = 1;
    EXECUTE IMMEDIATE 'DROP WRAPPER Wrapper1';
    SET STMT =
    -------- CREATE WRAPPER Wrapper1 LIBRARY 'db2drda.dll' 'OPTIONS (ADD DB2_FENCED "N");-----------

    'CREATE WRAPPER Wrapper1 LIBRARY "db2drda.dll" OPTIONS (ADD DB2_FENCED "N")';
    EXECUTE IMMEDIATE STMT;
    END

    error:

    Run: VENKATASD.CREATE_ROUGH

    {call VENKATASD.CREATE_ROUGH()}
    An unexpected token ""db2drda.dll"" was found following "PER Wrapper1 LIBRARY". Expected tokens may include: "CHAR_STRING_LITERAL".. SQLCODE=-104, SQLSTATE=42601, DRIVER=3.67.28
    Run of routine failed.
    - Roll back completed successfully.

  2. #2
    Join Date
    Jul 2014
    Posts
    294

    Wrapper dynamically

    THIS IS THE SOLUTION

    : SET STMT = 'CREATE WRAPPER MENTIS_WRAPPER LIBRARY ''db2drda.dll'' OPTIONS (ADD DB2_FENCED ''N'')';

Tags for this Thread

Posting Permissions

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