Home » Developer & Programmer » Forms » create directory with oracle form pl/sql (oracle database10g , oracle developer suite10g)
create directory with oracle form pl/sql [message #439410] Sat, 16 January 2010 06:13 Go to next message
tonna
Messages: 33
Registered: November 2009
Location: thai
Member


Hello experts,

i want to know how to create directory or folder which use pl/sql coding in oracle developer suite10g

my problem is when i use this code


trigger WHEN-BUTTON-PRESSED

EXECUTE IMMEDIATE 'CREATE OR REPLACE DIRECTORY'||'C:\RESTAURANT';


IT'S ERROR WITH "Error591 this feature is not supported in client-side programs"


I used to use function with webutil that's webutil_file.create_directory('c:\RESTAURANT');

trigger WHEN-BUTTON-PRESSED

WEBUTIL_FILE.CREATE_DIRECTORY('c:\RESTAURANT');

BUT STILL HAVE ERROR WITH "Error 221 'CREATE_DIRECTORY' is not a procedure or is undefined "


So,anybody know how to create directory with pl/sql that's use in oracle form in trigger when-button-pressed
or how to use function webutil_file.create_directory(); could you please give me any suggestion or answer that's very kind of you,
Thank you very much.. i waiting for answer...
Re: create directory with oracle form pl/sql [message #439411 is a reply to message #439410] Sat, 16 January 2010 06:29 Go to previous messageGo to next message
John Watson
Messages: 6396
Registered: January 2010
Location: Global Village
Senior Member
If you look up the detail of the CREATE DIRECTORY command in the SQL Language Reference, you'll see the relationship between an Oracle directory and a file system directory. Is that the source of your problem?
Re: create directory with oracle form pl/sql [message #439414 is a reply to message #439410] Sat, 16 January 2010 07:51 Go to previous messageGo to next message
Michel Cadot
Messages: 63802
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
1/ CREATE DIRECTORY command creates an Oracle directory not an OS one. An Oracle directory is a name used in PL/SQL to reference an OS directory.

2/ This directory can only be located on the database server not on the client side.

3/ CREATE DIRECTORY is not a basic command, you must have the CREATE ANY DIRECTORY privilege to create one.

Regards
Michel


Re: create directory with oracle form pl/sql [message #439416 is a reply to message #439410] Sat, 16 January 2010 08:04 Go to previous messageGo to next message
cookiemonster
Messages: 12320
Registered: September 2008
Location: Rainy Manchester
Senior Member
Judging from the error message I would assume you'll need to create a database procedure to do the create directory command and call that from the form.
Re: create directory with oracle form pl/sql [message #439418 is a reply to message #439416] Sat, 16 January 2010 09:33 Go to previous messageGo to next message
Littlefoot
Messages: 20825
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I believe that "directory" means an operating system directory, not an Oracle object. Why? Because the OP has saidQuote:
how to create directory or folder
I don't know anyone who calls Oracle "directory" a "folder". Do you?

So, if we suppose that I'm right and you're wrong* ./fa/451/0/, the OP will probably have to investigate use of the HOST built-in.


* Have you ever watched Matilda? If not, do so, you might like it.

There's a character, Mrs Trunchbull, who is a school headmaster but hates children and shows that anytime, anywhere she can. One of her lines is ... well, search the link for "right" or "wrong".

Also, I *hope* you understand that I'm just kidding. I've seen people here taking jokes far too seriously these days.
Re: create directory with oracle form pl/sql [message #439423 is a reply to message #439418] Sat, 16 January 2010 10:33 Go to previous messageGo to next message
John Watson
Messages: 6396
Registered: January 2010
Location: Global Village
Senior Member
This is an easy way to create a directory on the server -
exec dbms_scheduler.create_job('mkdir','executable','/bin/mkdir',1,auto_drop=>false);
exec dbms_scheduler.set_job_argument_value('mkdir',1,'/tmp/newdir');
exec dbms_scheduler.run_job('mkdir');

I'm trying to create directories on the client by using the remote external job facility, but I'm having trouble getting the scheduler agent to work. I think it is because I haven't got the security set up correctly. Has anyone done remote external jobs with 11.2?

Re: create directory with oracle form pl/sql [message #439424 is a reply to message #439410] Sat, 16 January 2010 10:42 Go to previous messageGo to next message
tonna
Messages: 33
Registered: November 2009
Location: thai
Member

Thank you everybody for the answer, first i was sorry but i just want to auto create folder when i press button in oracle form builder ,so i don't know how to code pl/sql to create folder. Thanks again i waiting for answer.
Re: create directory with oracle form pl/sql [message #439425 is a reply to message #439410] Sat, 16 January 2010 10:49 Go to previous messageGo to next message
cookiemonster
Messages: 12320
Registered: September 2008
Location: Rainy Manchester
Senior Member
To repeat an earlier point - do you want to create the folder on the db server or the client machine?
The answer is different depending on which you want.
Re: create directory with oracle form pl/sql [message #439426 is a reply to message #439410] Sat, 16 January 2010 12:51 Go to previous messageGo to next message
tonna
Messages: 33
Registered: November 2009
Location: thai
Member

on client machine ser..
Re: create directory with oracle form pl/sql [message #444755 is a reply to message #439426] Tue, 23 February 2010 23:45 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Sorry that I have been so long in replying. Have you solved your problem?

Also look at the 'host' and 'client_host' commands.

David
Previous Topic: Report call from FORMS
Next Topic: I WANT OLE LIBRARY
Goto Forum:
  


Current Time: Sun Sep 25 16:17:10 CDT 2016

Total time taken to generate the page: 0.04687 seconds