Home » Developer & Programmer » Forms » SQL Loader (Forms9i, Windows)
SQL Loader [message #575200] Mon, 21 January 2013 04:47 Go to next message
snsiddiqui
Messages: 172
Registered: December 2008
Senior Member
Dear all champs, I want to use SQLLDR (sql loader) in my forms9i form to load attendance data therefore I installed SQLLDR utility in user computer but it is not working, please help me for this requirement

Begin
:message := 'Please Wait, Data LOADING...!';
Delete From atnd_load;
Forms_ddl('Commit');
utlt := 'c:\oracle\ora90\bin\sqlldr';
usr := 'vikorapp';
pass := 'vikorapp';
strng := 'laptop';
cntrl := 'C:\VikorPayroll\Forms\AtndCtl.ctl';
lg := 'c:\temp\AtndLog.log';
bad := 'c:\temp\AtndBad.bad';
host(cmd);
:message:= 'Data Loading Complete...!';
End;
Re: SQL Loader [message #575201 is a reply to message #575200] Mon, 21 January 2013 04:51 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Have a look here (so that I wouldn't have to repeat myself).
Re: SQL Loader [message #575212 is a reply to message #575201] Mon, 21 January 2013 05:46 Go to previous messageGo to next message
snsiddiqui
Messages: 172
Registered: December 2008
Senior Member
You mean I have to install SQL Loader at my application server and please confirm, I think webutil is not supported in forms 9i therefore I have to use HOST command.
Re: SQL Loader [message #575215 is a reply to message #575212] Mon, 21 January 2013 05:59 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
You have several options; one of them is to install SQL*Loader on IAS. Note that your users should, then, have access to IAS in order to manipulate files stored on the server. You'd use HOST in that case.

Another option is to install 10g Webutil (which is, as far as I can tell, not supported on 9i but *should* work OK). CLIENT_HOST is to be used here.

The third option is to use external tables feature. It requires files to be stored on a database server (so users should have access to it). Database most probably is already installed with SQL*Loader so you don't have to install anything. External tables don't (directly) use SQL*Loader so you don't even have to create a control file and stuff, but manipulate date with pure (PL/)SQL.

Yet another option is to use SQL*Loader on a local PC, but not directly from a form, but through an operating system batch file (on MS Windows, that would be a .BAT). In there, you'd put call to SQLLDR, provide control file etc. Users would run it by (for example) double-clicking on the desktop icon.

I can't think of any other option at the moment.
Re: SQL Loader [message #575217 is a reply to message #575215] Mon, 21 January 2013 06:26 Go to previous messageGo to next message
snsiddiqui
Messages: 172
Registered: December 2008
Senior Member
Thanks LITTLEFOOT you give me multiple options now I am trying to go with first option, I will update you when my requirement will be resolved.

Furtheremore, would you please give me some details or share any link which will guide me about external tables mean how to store files then their use etc...
Re: SQL Loader [message #575220 is a reply to message #575217] Mon, 21 January 2013 06:32 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
It is all in the documentation (this is 10g version; I don't know which database version you use. If it is 9i, locate it on Tahiti).
Re: SQL Loader [message #575224 is a reply to message #575220] Mon, 21 January 2013 06:43 Go to previous messageGo to next message
snsiddiqui
Messages: 172
Registered: December 2008
Senior Member
As I told you in my previous reply that I am going to install SQLLDR in my application server, after installation it is still not loading data but when I execute my commad at command prompt then it is working, why?

Please any idea...
Re: SQL Loader [message #575226 is a reply to message #575224] Mon, 21 January 2013 06:51 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Control file, input file - they have to be located on IAS now. According to your first message, it is C:\TEMP directory. Are they in there?
Re: SQL Loader [message #575227 is a reply to message #575226] Mon, 21 January 2013 07:00 Go to previous messageGo to next message
snsiddiqui
Messages: 172
Registered: December 2008
Senior Member
Yes, I have also moved these files into IAS and as I informed you the commad is perfectly working at command prompt mean files exists.
Re: SQL Loader [message #575228 is a reply to message #575227] Mon, 21 January 2013 07:04 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I'd suggest you to create a batch file (such as LOAD_FILE.BAT) on IAS. Put call to SQLLDR in there, along with all parameters you use. For example:
sqlldr user/passw@db control=load_file.ctl log=load_file.log
and then, from a form, using the HOST built-in, call that batch file.
Re: SQL Loader [message #575229 is a reply to message #575228] Mon, 21 January 2013 07:18 Go to previous messageGo to next message
snsiddiqui
Messages: 172
Registered: December 2008
Senior Member
Still same problem, below mention command is working fine at command prompt but no result in forms

sqlldr vikorapp/vikorapp@livedb c:\application\atndctl.ctl c:\application\atndlog.log c:\application\atndbad.bad
Re: SQL Loader [message #575235 is a reply to message #575229] Mon, 21 January 2013 10:20 Go to previous message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Could you post the whole trigger code, please? Before you do that, have a look at this short tutorial (won't take more than 10 seconds of your time) and enclose your code into the [code] tags (as it appears that you aren't used to use that feature which makes your code easier to read).
Previous Topic: Image not displaying
Next Topic: Summit Office Supply Schema (Tables and Forms)
Goto Forum:
  


Current Time: Thu Apr 25 11:37:41 CDT 2024