// Define the method that we prototyped function verifyWork(){ // Check to see if the type property we added is set to a valid value if(this.type == "work"){ return true; }else{ return false; } } // Create a new property and method of the Resultset object. Resultset.prototype.type = null; Resultset.prototype.isWORK = verifyWork; // Create a pool of connections, a connection, a stored procedure, // and a result set var myPool = new DbPool("ORACLE", "mySID", "myApp", "appsPWD", "myTNS"); var myConn = myPool.connection('Employees', 15); var myStproc = myConn.storedProc("sp_employees"); var myResultSet = myStproc.resultSet(); // Using the prototype we defined, assign the type property myResultSet.type = "work"; // Check the type of the result set to see if it is valid if(myResultSet.isWORK()){ write(myResultSet + " has a valid type of " + myResultSet.type); }else{ write(myResultSet + " has an invalid type of " + myResultSet.type); }