|
|
1.1 root 1: {\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;\f1\fnil Times-Roman;\f2\fmodern Ohlfs;}
2: \paperw10800
3: \paperh10940
4: \margl2020
5: \margr100
6: {\colortbl;\red0\green0\blue0;}
7: \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b\i0\ulnone\fs36\fc0\cf0 PubsDemo\
8:
9: \b0\fs24 by Mai Nguyen, NeXT Developer Support Team\
10: \
11:
12: \b\fs28 Overview
13: \b0\fs24 \
14: \
15: In order to run this example, you need to have a SYBASE server with a pubs database installed. The pubs database is a sample database provided with the SYBASE limited server package. The
16: \b SybaseDemo.dbmodela
17: \b0 from /NextDeveloper/Examples/DatabaseKit/models is used to establish the proper connections between the database model and the Database Kit UI Objects.\
18: \
19: The purpose of this example is to show you how to quickly put together a simple database application without much programming by taking advantage of the Database Kit UI Objects such as DBTableView and DBModule.\
20: \
21: After you are properly connected to the Sybase server, you can perform operations such as
22: \b Select
23: \b0 ,
24: \b Insert
25: \b0 ,
26: \b Save
27: \b0 or
28: \b Delete
29: \b0 . Note that an
30: \b Insert
31: \b0 or
32: \b Delete
33: \b0 won't take effect in the database until a
34: \b Save
35: \b0 operation is performed. All operations such as
36: \b Save
37: \b0 ,
38: \b Delete
39: \b0 and
40: \b Select
41: \b0 are almost done without any coding. For simplicity's sake, there is no verification of the data entered via the FormCells for a
42: \b Save
43: \b0 or
44: \b Insert
45: \b0 operation.\
46: \
47:
48: \b\fs28\fc1\cf1 Preferences Setting\
49:
50: \b0\fs24 \
51: You can retrieve the data in ascending or descending order by selecting the Sort Order with the Radio buttons. Note that the tag values of these Radio Buttons correspond to the actual constants defined in dbkit/enums.h.\
52: You can either select all records by default, or qualify them by state of residence by entering the proper state into the textfield.\
53: \
54:
55: \b\fs28 Program Organization
56: \b0\fs24 \
57: \
58:
59: \b Major Classes in the Application
60: \b0 \
61: \
62: \
63:
64: \pard\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fi-1900\li1900\fc1\cf1 Controller A general manager object. A subclass of the Object class. Performs miscellaneous initialzations and operations such as inserting, selecting and sorting.\
65:
66: \pard\tx560\tx1120\tx2060\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\fi-2060\li2060\fc1\cf1 \
67:
68: \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\b\fc1\cf1 Other Peculiarities
69: \b0 \
70: The primary key for inserting a new record is the social security number. It is not possible to insert a new record with a duplicate id (or social security number). \
71: \
72:
73: \b\fs28 Topics Of Interest\
74:
75: \b0\fs24 \
76: The purpose of this example is to show you some simple examples of the usage of the DBKit UI Objects:\
77:
78: \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\b\fc1\cf1 \
79: - How to extract the important DBKit elements from the UI Objects (DBDatabase, DBFetchGroup, etc.):
80: \b0 \
81: See the method
82: \b appDidInit:
83: \b0 in the file Controller.m.\
84:
85: \f1\fs28 \
86:
87: \f0\b\fs24 - How to change the sort order when retrieving records
88: \b0 \
89: See the method
90: \b changeRetrieveOrder:
91: \b0 and
92: \b setRetrieveOrder:
93: \b0 in the file Controller.m.\
94:
95: \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc1\cf1 \
96: -
97: \b How to qualify a select operation using DBQualifier\
98:
99: \b0 See the method
100: \b buildSelectQualifier:
101: \b0 in the file Controller.m\
102: \
103: -
104: \b How to insert a new record to a database via the DBFetchGroup object
105: \b0 \
106: See the delegate method
107: \b fetchGroup:didInsertRecordAt:
108: \b0 in the file Controller.m\
109: \
110:
111: \b\fs28 Change History\
112:
113: \pard\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\b0\fs24\fi-1900\li1900\fc1\cf1 July 1993 Removed the
114: \b evaluateSQL:
115: \b0 method. To execute stored procedures, please refer to the Evaluator example.
116: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.