Home » Developer & Programmer » Forms » How make imp button
How make imp button [message #676554] Mon, 17 June 2019 04:12 Go to next message
alhakimy
Messages: 43
Registered: December 2016
Member
Hi

How can i make imp button in dev10g
Re: How make imp button [message #676555 is a reply to message #676554] Mon, 17 June 2019 05:15 Go to previous messageGo to next message
cookiemonster
Messages: 13636
Registered: September 2008
Location: Rainy Manchester
Senior Member
What do you want the imp button to do?
Re: How make imp button [message #676558 is a reply to message #676555] Mon, 17 June 2019 10:44 Go to previous messageGo to next message
alhakimy
Messages: 43
Registered: December 2016
Member
i want
1- drop user
2- create user
3-grant dba to user
4- imp file.dmp

I used this code in 6i but now with 10g did not work

forms_ddl('conn system/manager');
forms_ddl('drop user scott cascade');
forms_ddl('create user scott identified by tiger'); 
forms_ddl('grant dba to scott');
forms_ddl('conn scott/tiger');
HOST('Imp UserId =scott/tiger File = '||text_item169||' full=yes');
Re: How make imp button [message #676561 is a reply to message #676558] Tue, 18 June 2019 03:01 Go to previous messageGo to next message
cookiemonster
Messages: 13636
Registered: September 2008
Location: Rainy Manchester
Senior Member
Given this is something that can only be done by a user with DBA privs, and given that it doesn't seem to really involve forms functionality, why wouldn't you just write a script to do this instead?
Re: How make imp button [message #676563 is a reply to message #676561] Tue, 18 June 2019 04:10 Go to previous messageGo to next message
alhakimy
Messages: 43
Registered: December 2016
Member
How do
Re: How make imp button [message #676564 is a reply to message #676563] Tue, 18 June 2019 06:14 Go to previous messageGo to next message
Littlefoot
Messages: 21484
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Saying that "with 10g it did not work" - what exactly didn't work? I suggest you execute those commands one by one, carefully reviewing Oracle's messages so that you could see what's wrong and fix it. If you don't know how, return back here and explain the problem.
Re: How make imp button [message #676567 is a reply to message #676564] Wed, 19 June 2019 01:38 Go to previous messageGo to next message
alhakimy
Messages: 43
Registered: December 2016
Member
When press the button there is no message from oracle

But when using this code
forms_ddl('connect scott/tiger');
IF FORM_SUCCESS
   THEN
      MESSAGE ('connect ');
   ELSE
      MESSAGE ('Unconnect ');
   END IF;

The result is Unconnect
Re: How make imp button [message #676568 is a reply to message #676567] Wed, 19 June 2019 03:25 Go to previous message
cookiemonster
Messages: 13636
Registered: September 2008
Location: Rainy Manchester
Senior Member
Can you log into scott using sqlplus?

Form builder help on forms_ddl says that if it gives form_failure you can see the underlying error by calling DBMS_ERROR_CODE and
DBMS_ERROR_TEXT. Have you done that?
Previous Topic: How to create cumulative data
Next Topic: exp [merged 2 old threads by JD]
Goto Forum:
  


Current Time: Mon Jul 15 18:58:53 CDT 2019