Home » Developer & Programmer » Forms » sql loader with Oracle forms 10g (oracle forms 10.1.2.02 on windows 7 32 bit and oracle database 10g.)
sql loader with Oracle forms 10g [message #575321] |
Tue, 22 January 2013 04:08 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/f031f99c8979536cde9c136202b1c6f6?s=64&d=mm&r=g) |
Akarsh
Messages: 16 Registered: November 2012 Location: India
|
Junior Member |
|
|
hello,
i am working on oracle forms 10.1.2.02 on windows 7 32 bit and oracle database 10g.
i am trying to transfetr excel data in oracle database table.
When i am tryng to run sqlldr from cmd(Running as Administrator) ,data successfully transfered.
But when i try to perform this task via Oracle Forms I am getting
SQL*Loader-704: Internal error: ulconnect: OCIEnvCreate [-1]
Error.
ORACLE_HOME IS PROPERLY SET.
v_ctl_file := text_io.FOPEN(v_live_path||'test.ctl', 'w');
text_io.PUT_LINE (v_ctl_file, 'LOAD DATA');
text_io.PUT_LINE (v_ctl_file, 'INFILE '''||:load.file||'''');
text_io.PUT_LINE (v_ctl_file, 'BADFILE '''||v_live_path||'bad_data.bad'||'''');
text_io.PUT_LINE (v_ctl_file, 'INTO TABLE rap_data');
text_io.PUT_LINE (v_ctl_file, 'fields terminated by "," optionally enclosed by ''"'' trailing nullcols ');
text_io.PUT_LINE (v_ctl_file, '(
sno filler ,
packetid filler ,
cert filler ,
shape filler ,
color "trim(:color)" ,
clarity "trim(:clarity)" ,
carats filler ,
from1 filler ,
to1 filler ,
cut "trim(:cut)" ,
polish "trim(:polish)" ,
*sym "trim(:sym)" , *
flr filler ,
rap filler ,
back "trim(:back)",
price filler ,
tint filler ,
blkinc filler ,
loc filler ,
openinc filler ,
days filler ,
backdiff "trim(:backdiff)",
seller "trim(:seller)" ,
country "trim(:country)",
shape1 "trim(:shape1)" ,
size1 "trim(:size1)",
color1 "trim(:color1)",
clarity1 "trim(:clarity1)",
cut1 "trim(:cut1)",
polish1 "trim(:polish1)",
sym1 "trim(:sym1)",
flour "trim(:flour)",
price1 "trim(:price1)" ,
rap1 "trim(replace(:rap1,''%''))" ,
total "trim(:total)" ,
lab "trim(:lab)" ,
depth "trim(:depth)" ,
table1 "trim(:table1)" ,
measurements "trim(:measurements)" ,
position filler,
packetid1 filler,
srno recnum)') ;
text_io.FCLOSE(v_ctl_file);
v_bat_file := text_io.FOPEN(v_live_path||'load_data.bat', 'w');
text_io.put_line(v_bat_file,'SET ORACLE_HOME=C:\oracle\product\10.2.0\db_1');
text_io.put_line(v_bat_file,'SET path=%ORACLE_HOME%\BIN;%PATH%');
text_io.PUT_LINE (v_bat_file, 'sqlldr userid = '|| usid || '/' ||pwd || '@' ||db || ' ERRORS=1000000 control = '|| v_live_path||'test.ctl log = '|| v_live_path||'test.log'|| ' Skip=1' );
text_io.FCLOSE (v_bat_file);
host(v_live_path||'load_data.bat');
Why this error occured..
Thanks.
|
|
|
|
|
Goto Forum:
Current Time: Sun Feb 09 02:08:47 CST 2025
|