Home » Developer & Programmer » Forms » Excute Procedure When Value Is In Variable (Forms 9.0.4)
Excute Procedure When Value Is In Variable [message #439025] Wed, 13 January 2010 12:02 Go to next message
psmith8909@aol.com
Messages: 8
Registered: October 2006
Location: Las Vegas
Junior Member
Hello. I'm trying to excute a procedure but the procedure name is stored in a variable. Does anyone know how I can execute the procedure with the value being stored in the varible in Forms? Thanks.
Re: Excute Procedure When Value Is In Variable [message #439027 is a reply to message #439025] Wed, 13 January 2010 12:12 Go to previous messageGo to next message
cookiemonster
Messages: 13963
Registered: September 2008
Location: Rainy Manchester
Senior Member
You need to use dynamic sql. However dynamic sql can't be run directly in forms (if i remember rightly), so you're going to have to create a database procedure that'll call the other procedure dynamically (using execute immediate) and call that from your form.

That said, dynamic code of this sort is always a colossal pain to code/maintain/debug so I'd look long and hard for a way to make it non dynamic if I was you. Which would mean not storing procedure names in variables obviously.
Re: Excute Procedure When Value Is In Variable [message #439057 is a reply to message #439025] Wed, 13 January 2010 16:43 Go to previous message
psmith8909@aol.com
Messages: 8
Registered: October 2006
Location: Las Vegas
Junior Member
Thanks. I'm going to try a different approach. Was trying to avoid hard coding.
Previous Topic: calling report from form.
Next Topic: Show a pdf file into Forms Developersuite10gR1
Goto Forum:
  


Current Time: Sun Feb 09 14:03:11 CST 2025