// Assign the user submitted query to the client object client.sql = request.sql; // Create a pool of connections var myPool = new DbPool("ORACLE", "mySID", "myApp", "appsPWD", "myTNS"); // Open a connection from the pool. Give error if connection could // not be made. var myConn = myPool.connection('Employees', 15); if(myConn.connected()){ // Start a new transaction and write the results to a page, formatting // them with the SQLTable method. myConn.beginTransaction(); write(myConn.SQLTable(client.sql)); // Commit the transaction myConn.commitTransaction(); // If the connection fails, write an error message }else{ write('Error (' + myConn.majorErrorCode() + '): ' + myConn.majorErrorMessage); } // Release the connection myConn.release();