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
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.
Re: sql loader with Oracle forms 10g [message #575346 is a reply to message #575321] Tue, 22 January 2013 06:22 Go to previous messageGo to next message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Check this recent discussion first and see whether anything of that rings a bell.
Re: sql loader with Oracle forms 10g [message #575403 is a reply to message #575346] Tue, 22 January 2013 23:10 Go to previous message
Akarsh
Messages: 16
Registered: November 2012
Location: India
Junior Member
But sir sometimes my form running perfectly and loads data also.
and sometime i am getting this error with SQLLDR..

SQL*Loader-704: Internal error: ulconnect: OCIEnvCreate [-1]

Any solution?

[Updated on: Tue, 22 January 2013 23:11]

Report message to a moderator

Previous Topic: size of window
Next Topic: if condition in post-change
Goto Forum:
  


Current Time: Wed Jul 03 11:14:31 CDT 2024