// Assign the user submitted ID to the client object as properties client.uid = request.uid; client.name = request.name; client.pwd = request.pwd; // 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 SQL transaction to perform a SELECT. Notice the // cursor is updateable myConn.beginTransaction(); var currRow = myConn.cursor('SELECT uid,name,pwd FROM employees WHERE uid = ' + client.uid, true); // Select the row and assign values to the columns currRow.next(); currRow.uid = client.uid; currRow.name = client.name; currRow.pwd = client.pwd; currRow.updateRow("employees"); myConn.commitTransaction(); // Close the cursor and release the connection currRow.close(); myConn.release(); // If the connection fails, write an error message }else{ write('Error (' + myConn.majorErrorCode() + '): ' + myConn.majorErrorMessage); }