|
|
1.1 root 1: {\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;\f1\fmodern Ohlfs;}
2: \paperw11700
3: \paperh9320
4: \margl120
5: \margr120
6: {\colortbl;\red0\green0\blue0;}
7: \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b\i0\ulnone\fs36\fc0\cf0 SQLExecutor
8: \b0\fs24 \
9: by Mai Nguyen, NeXT Developer Support\
10: \
11:
12: \b\fs28 Overview
13: \f1\b0\fs20 \
14:
15: \f0\fs24 This example shows how to evaluate any arbitrary SQL statement for either the sybase or oracle adaptor.\
16: If you use the Sybase adaptor, you will also be able to execute stored procedures that return computed rows or status rows. You must programmatically determine the type of rows returned in order to properly display the result sets. (see SybaseDelegate.[hm]).\
17: If you use the Oracle adaptor, you can execute the stored procedures, but you cannot process the results being returned.\
18: For example, you can enter the following Oracle procedure in the evaluation panel:\
19: \
20:
21: \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\f1\fs20\fc0\cf0 BEGIN dbms_output.put_line('foobar'); END;
22: \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\fs24\fc0\cf0 \
23:
24: \fc1\cf1 \
25:
26: \b\fs28 Program Organization\
27:
28: \b0\fs24 \
29:
30: \b Major Classes in the Application
31: \b0 \
32:
33: \pard\tx2160\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fi-2140\li2140\fc1\cf1 \
34: Evaluator A generic object responsible for evaluating the SQL string
35: \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc1\cf1
36: \pard\tx2160\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fi-2140\li2140\fc1\cf1 \
37: \
38: SybaseDelegate A delegate object responsible for handling the case of stored procedures that return computed rows
39: \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc1\cf1 \
40:
41: \pard\tx2160\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fi-2140\li2140\fc1\cf1
42: \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc1\cf1 \
43:
44: \b\fs28 Topics Of Interest\
45:
46: \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\fs24\fc1\cf1 \
47: How to open a connection to a database and close it via a model file\
48:
49: \b0 See the file Controller.m, method
50: \b open:sender
51: \b0 \
52:
53: \b \
54: How to evaluate a stored procedure or any other SQL string
55: \b0 \
56: This is done in the Evaluator class. See the method
57: \b evaluate:
58: \b0 in the file Evaluator.m. See also the files
59: \b SybaseDelegate.[hm]
60: \b0 \
61:
62: \b \
63:
64: \pard\tx1340\tx2680\tx4020\tx5360\tx6720\tx8060\tx9400\tx10740\tx12080\tx13440\b0\fc1\cf1 \
65:
66: \pard\tx1140\tx2300\tx3440\tx4600\tx5760\tx6900\tx8060\tx9200\tx10360\tx11520\fc1\cf1 Valid for NEXTSTEP Release 3.2 installed with the Enterprise Objects Framework Release 1.0, 1.1
67: \pard\tx1340\tx2680\tx4020\tx5360\tx6720\tx8060\tx9400\tx10740\tx12080\tx13440\fc1\cf1 \
68:
69: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.