DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Forms_DDL compile package...

  1. #1
    Join Date
    Mar 2002
    Posts
    4

    Question

    Hi all,
    I'm using Forms 4.5, Oracle7 Server Release 7.3.3.0.0.
    I have a Forms application that is supposed to switch
    a package in the database from an old version to a new Version and back(if necessary).
    There are two files say in directory C:\temp named like
    "newVers.sql" and "oldVers.sql"
    containing the proper code to create or replace the packages.
    I created a Canvas with two buttons each with something like the following code in the WHEN-BUTTON-PRESSED trigger:
    FORMS_DDL('@c:\temp\newVers.sql');
    If I issue the command directly in SQL+, everything works fine so the content of the .sql files is not the problem.
    If I press the button in the Forms application I get the error ORA-00900, invalid SQL statement.
    Can anybody tell me where I'm going wrong?

    thanks in advance
    horst borscht

  2. #2
    Join Date
    May 2002
    Posts
    2,645
    Try it this way - where you assign a string name to your path

    DECLARE
    procname VARCHAR2(30);
    BEGIN
    IF :global.flag = 'TRUE' THEN
    procname := 'c:\path\file_name';
    ELSE
    procname := 'c:\path\other_file_name';
    END IF;

    Forms_DDL('run '|| procname );

    IF NOT Form_Success THEN
    Message('procname failied);
    ELSE
    Message('procname successful');
    END IF;

    END;


    Any valid PL/SQL block may be executed, and *should* include semicolons where appropriate. PL/SQL statements, including calls to stored procedures, must be enclosed in a valid BEGIN/END block structure. There is no need to end the PL/SQL block with a slash '/' character. While perhaps improving readability of code, there is no need to pay attention to line breaks in the string which you pass as a command to Forms_DDL().

Posting Permissions

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


Click Here to Expand Forum to Full Width