// Open a connection var myConn = database.connect("ORACLE", "mySID", "myApp", "appsPWD", "myTNS"); if(myConn.connected()){ myConn.beginTransaction(); // Run the stored procedure var myStproc = myConn.storedProc("sp_employees"); myResultSet = myStproc.resultSet(); // Commit the transaction myConn.commitTransaction(); // Close the result set myResultSet.close(); // Release the connection myConn.release(); // If the connection fails, write an error message }else{ write('Error (' + myConn.majorErrorCode() + '): ' + myConn.majorErrorMessage); }