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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bulk Update of Oracle using JSP and SQL plus

Status
Not open for further replies.

darshbal

Programmer
Sep 26, 2002
3
0
0
AU
I am thinking of using SQL Loader but I have to use with JSP - as in it has to be automated using jsp - Does anyone know how to jsp code a webpage to allow one to send a file to add more tuples in my oracle databse. Antoher suggestion that someone told me was to use a parser which reads each line and sends the data oracle - Any help would be appreciated
 
Hi,
If You can use cgi, then You would be able to do with SQL loader itself or with perl. By the way in which platform does it run. Thanks & Regards,
DoubleH
 
We are using Windows 2000 wiht Tomcat for the JSP

Any more help,snippets of code or website links would be much appreciated as to coding a jsp page to do this automatically.

thanks

 
Hi,
From JSP page, invoke a perl-cgi script. This can be done very easily. It's like calling another html page. Then, in that perl-cgi script, include DBI module and start coding. You can get DBI from I have used Perl-DBI in Solaris for loading a large data which invloved many tranformations and processings. The perl program would look like this:
use DBI;
my $dbh = DBI->connect ( "dbi:Oracle:archaeo", "username", "password" )
or die "Can't connect to Oracle database: $DBI::errstr\n";
my $sth = $dbh->prepare( "INSERT INTO ...." )
or die "Can't prepare INSERT statement: $DBI::errstr\n";
$sth->execute
or die "Can't execute SQL statement: $DBI::errstr\n";
$dbh->commit;
$dbh->disconnect;


hope this helps!
Thanks & Regards,
DoubleH
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top