Thread: D2k
-
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
-
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
-
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
-
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|