Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Setting bind variables or defines from applications?
dean schrieb:
> Now, what I really would love is to be able to set a define in my
> application, to point to the current output set, and then not have to
> send in the output set to all the SQL statements we generate.
>
> Sorry for the above, I realize now that its not bind variables, but
> definitions.
I don't think there's a way for this.
One way or another you will need dynamic sql. Whether that kills your
server or not depends largely on the frequency of that action. Once
a week is surely okay, ten times a second could cause a problem if
you have to share the database with other applications.
If you want to be generic, you probably have to do a bit of refactoring
in your app.
Application Express (htmldb) allows generic statements by having a special
&YourKeyWord.- or #YourKeyWord#-syntax, depending on where you replace.
Maybe you could separate out the sql part and do keyword replacement
based on some global state? If you use bind variables for all other
literals, a replacement would be just a regsub or so.
Lots of Greetings!
Volker
Received on Sat Apr 22 2006 - 08:36:45 CDT
![]() |
![]() |