Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Load tables with text file

Status
Not open for further replies.

ofsouto

Programmer
Apr 29, 2000
185
BR
A Visual Basic application opens a text file (client machine), reads line to line and loads a table.
I want to know if it´s possible to create a stored procedure (or another object) to execute this function and How can I do this?
Oracle 8i (release 8.1.7)
 
Of course, you may pass the content of your text file as VARCHAR2 or CLOB to some procedure, but why don't you use SQL*LOADER?
 
I thought about a procedure that opens and processes a text file.
Is it possible to execute SQL*LOADER from Visual Basic?
 
Yes, you may call sql*loader as you may run any program. As for reading file from procedure, you may use UTL_FILE package, but in this case your file should be "visible" from Oracle server, not from client.
 
Great, I have a great answer for you.
It is possible to run loader from VB. But why involve one more tool. Use UTL_FILE package. This package helps you read and write OS files. Call this from a procedure while passing file to this procedure. IF any probs write me.
 
UTL_FILE is suitable for reading SMALL TEXT FILES only and its executed on server. You can not even open a file without knowing its name, even if it's the only file in directory.
 
Could you show me an visual basic example calling sql*loader?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top