Home » Developer & Programmer » Application Express, ORDS & MOD_PLSQL » using external table
using external table [message #453314] Wed, 28 April 2010 04:17 Go to next message
swapna053
Messages: 18
Registered: March 2010
Junior Member
hello,
I am using apex 3.2 oracle 10g
I have a folder EXP in C drive where *.csv files are present.
I am using external table to fetch data from the csv file to db table through a procedure.It works fine.

Server Side:
Now i installed the application in one machine (server machine) and gave create directory privileges and copied exp folder and *.csv files to this server machine.

Now i am accessing the application from a client machine through browser.In that machine also i created EXP folder with csv files.

But the external table always point to server machine EXP and not Client machine EXP Folder.
What need to be done so that it points to its own EXP folder?

Thanks

[MERGED by LF]

[Updated on: Thu, 29 April 2010 04:15] by Moderator

Report message to a moderator

Re: using external table [message #453322 is a reply to message #453314] Wed, 28 April 2010 04:44 Go to previous messageGo to next message
Littlefoot
Messages: 21415
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Nothing. External tables' files are always placed on a server, not on a client. If users operate those CSV files, you might need to map EXT directory on a server to a client computer.
Re: using external table [message #453328 is a reply to message #453322] Wed, 28 April 2010 04:58 Go to previous messageGo to next message
swapna053
Messages: 18
Registered: March 2010
Junior Member
hi,
Thanks for the reply,
how do i do this map EXP directory on a server to a client computer.
Re: using external table [message #453337 is a reply to message #453328] Wed, 28 April 2010 05:28 Go to previous messageGo to next message
Littlefoot
Messages: 21415
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
In Windows Explorer: Tools menu - Map network drive.
Re: using external table [message #453340 is a reply to message #453337] Wed, 28 April 2010 05:35 Go to previous messageGo to next message
swapna053
Messages: 18
Registered: March 2010
Junior Member
hi,

You mean to say i should share the EXP folder in the client machine so that server machine can see that directory?

Thanks
Re: using external table [message #453348 is a reply to message #453340] Wed, 28 April 2010 05:48 Go to previous messageGo to next message
Littlefoot
Messages: 21415
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
No, but vice versa.
run batch file from client machine [message #453470 is a reply to message #453314] Thu, 29 April 2010 03:41 Go to previous messageGo to next message
swapna053
Messages: 18
Registered: March 2010
Junior Member
Hello,

I am using a bat file called gen.bat.
The code is like this

if exist "%EXP_PATH%\data\*.csv" goto found
echo no *.csv files found.
goto end

:found

rem delete filename file
del %EXP_PATH%\filenames.txt

rem to go to directory
cd %EXP_PATH%\data

:end

Now here %EXP_PATH% is a n environment variable and the value is C:\exp

Now i have shared the exp folder and i am trying to run from another machine, but the problem is the environment variable comes as null there.

Waht need to be done for that?

Thanks

Re: using external table [message #453471 is a reply to message #453340] Thu, 29 April 2010 03:45 Go to previous messageGo to next message
swapna053
Messages: 18
Registered: March 2010
Junior Member
Hello,

I shared the folder in the server machine, now the problem is i have a batch file which is used to find the csv files and through batch script copies to a file called filenames.txt This filenames.txt is pointed by external table.When i run that batch file from client machine,the bat files uses Environment variable and that comes null in the client machine?

Thanks

[Updated on: Thu, 29 April 2010 03:48]

Report message to a moderator

Re: run batch file from client machine [message #453474 is a reply to message #453470] Thu, 29 April 2010 04:04 Go to previous messageGo to next message
ThomasG
Messages: 3207
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
Set the environment variable before you start the script.
Re: run batch file from client machine [message #453475 is a reply to message #453470] Thu, 29 April 2010 04:08 Go to previous messageGo to next message
swapna053
Messages: 18
Registered: March 2010
Junior Member
hello,
The environment variable is already set in the server machine.And it works fine when run from the server machine.Only when i try to run from the client machine it becomes null.........

Thanks

[Updated on: Thu, 29 April 2010 04:10]

Report message to a moderator

Re: run batch file from client machine [message #453477 is a reply to message #453475] Thu, 29 April 2010 04:19 Go to previous messageGo to next message
Littlefoot
Messages: 21415
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
As (logically) we are still discussing the same subject, I have moved your "batch" topic from Windows forum over here and merged two topics.


I didn't quite get what is where.
- where is batch file?
- what environment variable did you set? Is it server's or client's one? Or both? What is its value? Is directory it contains on a server or a client?

If you mapped server's directory on your client computer, then - I guess - you should manipulate your "local" disk (a mapped one) from a batch file (which is on a client), not "server" disk.

For example: if mapped disk's letter is "S", then path to the file isn't "C:\EXT" (which is on a server), but "S:\EXT" (which is on a client).
Re: run batch file from client machine [message #453479 is a reply to message #453477] Thu, 29 April 2010 04:34 Go to previous messageGo to next message
swapna053
Messages: 18
Registered: March 2010
Junior Member
Hello,

It goes like this

On the server side:
I have exp folder in c drive
which has 2 folder
- data ->which contains all the *.csv files
- scripts - > which contains some batch file.
The work of one of this batch file is to copy the name of the csv file and put into a file called filenames.txt.

This filenames.txt file is pointed by external table.
Now since i am using a environment variable(EXP_PATH) whose value(C:\exp) is set at server side, in the client side when i was running the batch file , the ev value comes as null.

Now,you mean to say if i am running the batch file from client side then i should create another ev at client side?

Thanks

[Updated on: Thu, 29 April 2010 04:41]

Report message to a moderator

Re: run batch file from client machine [message #454418 is a reply to message #453479] Wed, 05 May 2010 08:16 Go to previous message
delna.sexy
Messages: 941
Registered: December 2008
Location: Surat, The Diamond City
Senior Member
I faced same problem.
Actually, I was trying to access one Excel file from client machine. But didn't succeed.

regards,
Delna
Previous Topic: problem with running query in the application
Next Topic: NCLOB_CONVERSION
Goto Forum:
  


Current Time: Sat May 26 01:29:19 CDT 2018