TDI to Oracle

// Test
 var url = "jdbc:oracle:thin:@//hostname:PORT/INSTANCE";
 var username = "someUser";
 var pass = "somePass";


//  Load up the oracle driver
try {
java.sql.DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());

} catch(err){

task.logmsg("ERROR","Could not register ojdbc driver, exiting");
system.abortAssemblyLine(err.toString());
}
// Get a connetion to the database
try {
var conn =  java.sql.DriverManager.getConnection(url,username,pass);

} catch(err){

task.logmsg("ERROR","Cannot connect to database, exiting");
system.abortAssemblyLine(err.toString());
}
Comments