|
|
Sample Programs from NeXSTEP 3.3
{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;\f1\fmodern Ohlfs;}
\paperw11700
\paperh9320
\margl120
\margr120
{\colortbl;\red0\green0\blue0;}
\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b\i0\ulnone\fs36\fc0\cf0 Evaluator
\b0\fs24 \
by Jack Greenfield, NeXT Engineering\
\
\b\fs28 Overview
\f1\b0\fs20 \
\f0\fs24 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. \
\fc1\cf1 \
\b\fs28 Program Organization\
\b0\fs24 \
\b Major Classes in the Application
\b0 \
\
\
\pard\tx2160\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fi-2140\li2140\fc1\cf1 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.\
\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc1\cf1 \
\pard\tx2160\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fi-2140\li2140\fc1\cf1 ScrollViewDriver A generic object with a scrollview outlet to display text inside a scrollview � la sprintf style.\
\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc1\cf1 \
\b\fs28 Topics Of Interest\
\pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\fs24\fc1\cf1 \
How to evaluate a stored procedure or any other SQL string
\b0 \
This is done in the SQLWindow class. See the method
\b evaluate:
\b0 in the file SQLWindow.m\
\pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\b\fc1\cf1 \
How to display the result set returned by a stored procedure or the execution of an SQL string
\b0 \
This is done in the SQLWindow class. See the method
\b binderWillChangeResultSet:
\b0 in the file SQLWindow.m\
\pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\b\fc1\cf1 \
\pard\tx1340\tx2680\tx4020\tx5360\tx6720\tx8060\tx9400\tx10740\tx12080\tx13440\b0\fc1\cf1 Last Edited: Mai Nguyen, July 1993
}
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.