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

Thread: D2k

Hybrid View

  1. #1
    Join Date
    Jun 2001
    Posts
    56
    Hi
    I wanna change query in runtime environment in developer/2000 reports with a button through DO_SQL .

    My report depend on
    select * from user;

    Pl/Sql code for button
    Example

    Procedure U_1ButtonAction is
    begin
    SRW.DO_SQL('SELECT * FROM USER
    0REDR BY USER_NAME');
    EXCEPTION
    WHEN SRW.DO_SQL_FAILURE THEN
    SRW.MESSAGE(100, 'ERROR WHILE CHANGING ORDER.');
    RAISE SRW.PROGRAM_ABORT;
    END;

    In above procedure there was an error or any change plz write
    or
    write an example.
    Thanx

  2. #2
    Join Date
    Jun 2001
    Posts
    12

    Exclamation

    Hi,

    There is a limit for the DO_SQL Procedure to DDL Statements

    The DO_SQL procedure is useful for executing DDL statements.
    However, do not use this procedure to execute DML statements.
    In general, DML statements are executed more efficiently within program units than with the DO_SQL procedure.

    Vidya..

    rvsagar@rediffmail.com

    Vidya

  3. #3
    Join Date
    Jan 2001
    Posts
    153
    Procedure U_1ButtonAction is
    begin
    SRW.DO_SQL('SELECT * FROM USER
    0REDR BY USER_NAME');
    EXCEPTION
    WHEN SRW.DO_SQL_FAILURE THEN
    SRW.MESSAGE(100, 'ERROR WHILE CHANGING ORDER.');
    RAISE SRW.PROGRAM_ABORT;
    END;


    "CHECK THE ORDER BY CLAUSE"...THE SPELLING IS WRONG..

    Vijays
    Vijay.s

  4. #4
    Join Date
    May 2001
    Posts
    70
    Alternatively, you could use the Reports trigger (before - report trigger) to build a bind variable for your select statement.

    This has allowed me to build some pretty flexible but very rebust reports.

    Good Luck.

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