Home » Developer & Programmer » Forms » Cannot upload a file content to Database (6i To 10g Migration )
Cannot upload a file content to Database [message #376134] Tue, 16 December 2008 04:25 Go to next message
sirivijay
Messages: 48
Registered: October 2008
Member
File upload issue Please help me to solve this
**********************************************

We are currently migrating our application from forms 6i to 10g.We had an issue of selecting a file from a local system and upload its contents to database. we are using three files here
1) .OUT file:- This file contains some data which is an output of some other application,and this data needs to be uploaded to some tables in database.

2) .CTRL file:-this control file contains some procedures will divide the data with
position numbers .

3)A CMD file:-the contents of this file are shown below

************************************************************************
@echo off

REM set parameters
REM
SET userid=%1
SET file_log=%2
SET file_bad=%3
SET control=%4
SET data=%5

REM
SET TEMP_ORACLE_HOME=%ORACLE_HOME%
SET ORACLE_HOME=C:\oracle\DevSuiteHome
SET PATH=%PATH%;C:\oracle\appserver\orainfra\bin

REM
REM start sqlloader with the parameters
REM

sqlldr userid=%userid% log='%file_log%' bad='%file_bad%' errors=0 control='"%control%"' bindsize=1500000 rows=500 data='%data%'
REM

:EXIT
SET ORACLE_HOME=%TEMP_ORACLE_HOME%

****************************************************************
This file will start sql loader .and with the help of this cmd file and control file we are uploading the .OUT file to database . all these are done in 6i.but we are not knowing how to implement this in 10g.we have attached webutil properly and changed HOST to CLIENT_HOST..we are able to open the file open dialogue with CLIENT_GET_FILE_NAME and browse for the file to upload. But its giving the error that unable to find the program unit being called.

Here is the piece of code where we are invoking the sql loader and providing the control file
************************************************************************

loadcommand := 'sqlldr'||
'userid='||connection||' log="'||
filename||'_'||logdate||'.log" bad="'||
filename||'_'||logdate||'.bad" errors=0 '||
'control="C:\oracle\DevSuiteHome\forms\genrem.ctl" bindsize=1500000 rows=500 data="'|| -- This line is different from the one above
filename||'"';
End If;

CLIENT_HOST(loadcommand);
*************************************************************
While debugging ,The code is breaking at the CLIENT_HOST(loadcommand); ..and showing the error.that its not able to find the program unit being called

As I am new to forms we are not finding a way to solve this issue..Please Give your valuable suggestions to solve this issue.

And suggest me if there is any other way to invoke the sqlldr from a procedure in .pll library.

Thanks in advance.
Regards ,
Pradeep.
Re: Cannot upload a file content to Database [message #376153 is a reply to message #376134] Tue, 16 December 2008 05:33 Go to previous message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
its giving the error that unable to find the program unit being called.

It appears that operating system can not find the executable; is the directory which contains this file part of the PATH environment variable? If not, try to add it. Or, alternatively, specify the full path to the executable file (i.e. not just "exe_file" but "c:\some_directory\another_directory\exe_file").
Previous Topic: change color on disabled drop down list
Next Topic: Mapping functional key in forms 10g
Goto Forum:
  


Current Time: Sun Dec 11 02:02:15 CST 2016

Total time taken to generate the page: 0.04179 seconds