Evaluator
by Jack Greenfield, NeXT Engineering

Overview
This example shows how to evaluate any arbitrary SQL statement or stored procedure by using a subclass of DBBinder, called MultiBinder. This example has been designed to be used with  the 3.1 Sybase Adaptor, so that you can get a non-rectangular result set from the evaluation of the stored procedure. However, it could theoretically work with other adaptors as well. 

Program Organization

Major Classes in the Application

MultiBinder	A subclass of DBBinder. This object extends the DBBinder functionality. In particular, it adds the ability to notify the DBBinder delegate when a new result set has been fetched from the binder. Thus, one can get multiple result sets from a stored procedure evaluation. Note that this feature is only valid starting with NextStep Release 3.1. 

SQLWindow	A generic object responsible for evaluating the SQL string and displaying the results from the DBBinder fetch operations.
 
 ScrollViewDriver	A generic object with a scrollview outlet to display text inside a scrollview Õ la sprintf style.

Topics Of Interest

How to evaluate a stored procedure or any other SQL string
This is done in the SQLWindow class. See the method evaluate:  in the file SQLWindow.m

How to display the result set returned by a stored procedure or the execution of an SQL string
This is done in the SQLWindow class. See the method binderWillChangeResultSet:  in the file SQLWindow.m

Last Edited:  Mai Nguyen, July 1993