Home » Developer & Programmer » Forms » how to call script inside form!!!
icon3.gif  how to call script inside form!!! [message #279182] Wed, 07 November 2007 04:51 Go to next message
sh_eng
Messages: 15
Registered: May 2006
Junior Member
hello
I'm using developer 10g,
i make a script and i call it from the sql @script_name it works sucessfully,
now i want to do this call from a button (when_button_pressed) inside a form instead of the sql , so how to do this??

Thanks in advance.
Re: how to call script inside form!!! [message #279201 is a reply to message #279182] Wed, 07 November 2007 05:31 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Using the HOST built-in.
Re: how to call script inside form!!! [message #279213 is a reply to message #279201] Wed, 07 November 2007 06:34 Go to previous messageGo to next message
sh_eng
Messages: 15
Registered: May 2006
Junior Member
hello
Thanks For reply, but i try host('script_name'), it show the script but no execute, so how can i execute it??

Thanks alot
Re: how to call script inside form!!! [message #279223 is a reply to message #279213] Wed, 07 November 2007 06:59 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
No, you should use host to invoke SQL*Plus.

MHE
Re: how to call script inside form!!! [message #279229 is a reply to message #279223] Wed, 07 November 2007 07:35 Go to previous messageGo to next message
sh_eng
Messages: 15
Registered: May 2006
Junior Member
hello
thanks again for your reply,
but i still can't do this
would you plz send me steps of how to invoke sql and how to excute the script in it.

Thanks.
Re: how to call script inside form!!! [message #279232 is a reply to message #279229] Wed, 07 November 2007 07:40 Go to previous messageGo to next message
vamsi kasina
Messages: 2112
Registered: October 2003
Location: Cincinnati, OH
Senior Member
Quote:

would you plz send me steps of how to invoke sql and how to excute the script in it
Would you please post the steps, which you have done till now? (I mean the code, which you have written)

By
Vamsi
Re: how to call script inside form!!! [message #279330 is a reply to message #279232] Wed, 07 November 2007 17:36 Go to previous messageGo to next message
jesliej
Messages: 4
Registered: July 2006
Location: Longview, WA
Junior Member
Hi

What is your platform Windows or Unix?

I use UNIX and this can be done by writing a UNIX shell script

1. Shell script will connect to oracle
2. The Sql script will be executed

In windows you could try the same by using batch files

Thanks
Simpson
Re: how to call script inside form!!! [message #279373 is a reply to message #279330] Thu, 08 November 2007 00:34 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I'm afraid you missed the point - we are talking about calling a SQL file from a form, not command prompt.
Re: how to call script inside form!!! [message #279393 is a reply to message #279373] Thu, 08 November 2007 01:27 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Well, since Forms Builder is not a command line interpreter you cannot invoke the script as such. You'd have to invoke a separate interpreter (like SQL*Plus) and feed the script you want to that tool. A bit like I said before.

But in a 3 tier environment you should be careful. I don't think HOST() executes on the client. The webutil.pll can help you out there.

MHE
Re: how to call script inside form!!! [message #279407 is a reply to message #279393] Thu, 08 November 2007 02:23 Go to previous messageGo to next message
sh_eng
Messages: 15
Registered: May 2006
Junior Member
hello;
i got lost
let me describe my problem again:
i'm using a oracle devloper 10g, i bulit a form , inside it there is a button (when button pressed) i want to paste a code in this trigger to do the following :
-open the sql command prompt
-execute a script (this script saved in my computer ex: c:\script_name)

so how can i do this

hope to find a solution.

Thanks alot.
Re: how to call script inside form!!! [message #279409 is a reply to message #279407] Thu, 08 November 2007 03:05 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Ok, I'll see whether I see chance to create a small example for you.

MHE
Re: how to call script inside form!!! [message #279434 is a reply to message #279407] Thu, 08 November 2007 06:23 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Would something like this help?
-- WHEN-BUTTON-PRESSED trigger

HOST('sqlplus -s scott/tiger@ora10 @c:\script_name.sql');
Re: how to call script inside form!!! [message #279439 is a reply to message #279434] Thu, 08 November 2007 07:46 Go to previous message
sh_eng
Messages: 15
Registered: May 2006
Junior Member
hiiiii

Thanks alot, it work well.
Thanks again Razz
Previous Topic: The code work in database not in forms ... why?
Next Topic: how to generate a tree
Goto Forum:
  


Current Time: Sun Feb 09 20:38:48 CST 2025