Contents

Chapter 1: Introduction
What's in this manual?
Manual conventions
Developer support services
Ordering printed documentation

Part I: Programming with Delphi

Chapter 2: Using Object Pascal with the VCL
Object Pascal and the VCL
Using the object model
   What is an object?
      Examining a Delphi object
   Inheriting data and code from an object
      Objects, components, and controls
   Scope and qualifiers
      Private, protected, public, and published declarations
   Using object variables
   Creating, instantiating, and destroying objects
      Components and ownership
Using components
   Delphi's standard components
      Properties common to visual components
      Text controls
      Specialized input controls
      Buttons and similar controls
      Handling lists
      Grouping components
      Visual feedback
      Grids
      Graphic display
      Windows common dialog boxes
   Setting component properties
      Using the Object Inspector
      Setting properties at runtime
   Calling methods
   Working with events and event handlers
      Generating a new event handler
      Generating a handler for a component's default event
      Locating event handlers
      Associating an event with an existing event handler
      Associating menu events with event handlers
      Deleting event handlers
Using helper objects
   Working with lists
   Working with string lists
      Loading and saving string lists
      Creating a new string list
      Manipulating strings in a list
      Associating objects with a string list
   The Windows registry and INI files
   Using streams
Using data modules and remote data modules
   Creating and editing data modules
      Creating business rules in a data module
   Accessing a data module from a form
   Adding a remote data module to an application server project
Using the Object Repository
   Sharing items within a project
   Adding items to the Object Repository
   Sharing objects in a team environment
   Using an Object Repository item in a project
      Copying an item
      Inheriting an item
      Using an item
   Using project templates
   Modifying shared items
   Specifying a default project, new form, and main form
Adding custom components to the IDE

Chapter 3: Common programming tasks
Handling exceptions
   Protecting blocks of code
      Responding to exceptions
      Exceptions and the flow of control
      Nesting exception responses
   Protecting resource allocations
      What kind of resources need protection?
      Creating a resource protection block
   Handling RTL exceptions
      What are the RTL exceptions?
      Creating an exception handler
      Exception handling statements
      Using the exception instance
      Scope of exception handlers
      Providing default exception handlers
      Handling classes of exceptions
      Reraising the exception
   Handling component exceptions
   Using TApplication.HandleException
   Silent exceptions
   Defining your own exceptions
      Declaring an exception object type
      Raising an exception
Using interfaces
   Interfaces as a language feature
      Sharing interfaces between classes
      Using interfaces with procedures
   Implementing IUnknown
   TInterfacedObject
   Using the as operator
   Reusing code and delegation
      Using implements for delegation
      Aggregation
   Memory management of interface objects
      Using reference counting
      Not using reference counting
   Using interfaces in distributed applications
Working with strings
   Character types
   String types
      Short strings
      Long strings
      WideString
      PChar types
      OpenString
   Runtime library string handling routines
      Wide character routines
      Commonly used long string routines
   Declaring and initializing strings
   Mixing and converting string types
   String to PChar conversions
      String dependencies
      Returning a PChar local variable
      Passing a local variable as a PChar
   Compiler directives for strings
   Strings and characters: related topics
Working with files
   Manipulating files
      Deleting a file
      Finding a file
      Changing file attributes
      Renaming a file
      File date-time routines
      Copying a file
   File types with file I/O
   Using file streams
      Creating and opening files
      Using the file handle
      Reading and writing to files
      Reading and writing strings
      Seeking a file
      File position and size
      Copying
Defining new data types

Chapter 4: Building applications, components, and libraries
Creating applications
   Windows applications
      User interface models
      Setting IDE, project, and compilation options
   Programming templates
   Console applications
   Service applications
      Service threads
      Service name properties
      Debugging services
Creating packages and DLLs
   When to use packages and DLLs
Writing database applications
Building distributed applications
   Distributing applications using TCP/IP
      Using sockets in applications
      Creating Web server applications
   Distributing applications using COM and DCOM
      COM and DCOM
      MTS
   Distributing applications using CORBA
   Distributing database applications

Chapter 5: Developing the application user interface
Understanding TApplication, TScreen, and TForm
   Using the main form
   Adding additional forms
      Linking forms
   Working at the application level
   Handling the screen
   Managing layout
Working with messages
More details on forms
   Controlling when forms reside in memory
      Displaying an auto-created form
      Creating forms dynamically
      Creating modeless forms such as windows
      Using a local variable to create a form instance
   Passing additional arguments to forms
   Retrieving data from forms
      Retrieving data from modeless forms
      Retrieving data from modal forms
Reusing components and groups of components
Creating and using component templates
Working with frames
   Creating frames
      Adding frames to the Component palette
   Using and modifying frames
   Sharing frames
Creating and managing menus
   Opening the Menu Designer
   Building menus
      Naming menus
      Naming the menu items
      Adding, inserting, and deleting menu items
      Creating submenus
      Viewing the menu
   Editing menu items in the Object Inspector
   Using the Menu Designer context menu
      Commands on the context menu
      Switching between menus at design time
   Using menu templates
   Saving a menu as a template
      Naming conventions for template menu items and event handlers
   Manipulating menu items at runtime
   Merging menus
      Specifying the active menu: Menu property
      Determining the order of merged menu items: GroupIndex property
   Importing resource files
Designing toolbars and cool bars
   Adding a toolbar using a panel component
      Adding a speed button to a panel
      Assigning a speed button's glyph
      Setting the initial condition of a speed button
      Creating a group of speed buttons
      Allowing toggle buttons
   Adding a toolbar using the toolbar component
      Adding a tool button
      Assigning images to tool buttons
      Setting tool button appearance and initial conditions
      Creating groups of tool buttons
      Allowing toggled tool buttons
   Adding a cool bar component
      Setting the appearance of the cool bar
   Responding to clicks
      Assigning a menu to a tool button
   Adding hidden toolbars
   Hiding and showing toolbars
Using action lists
   Action objects
   Using Actions
      Centralizing code
      Linking properties
      Executing actions
      Updating actions
   Pre-defined action classes
      Standard edit actions
      Standard Window actions
      DataSet actions
   Writing action components
      How actions find their targets
      Registering actions
      Writing action list editors
   Demo programs

Chapter 6: Working with controls
Implementing drag-and-drop in controls
   Starting a drag operation
   Accepting dragged items
   Dropping items
   Ending a drag operation
   Customizing drag and drop with a drag object
   Changing the drag mouse pointer
Implementing drag-and-dock in controls
   Making a windowed control a docking site
   Making a control a dockable child
   Controlling how child controls are docked
   Controlling how child controls are undocked
   Controlling how child controls respond to drag-and-dock operations
Working with text in controls
   Setting text alignment
   Adding scroll bars at runtime
   Adding the Clipboard object
   Selecting text
   Selecting all text
   Cutting, copying, and pasting text
   Deleting selected text
   Disabling menu items
   Providing a pop-up menu
   Handling the OnPopup event
Adding graphics to controls
   Setting the owner-draw style
   Adding graphical objects to a string list
      Adding images to an application
      Adding images to a string list
      Drawing owner-drawn items
   Sizing owner-draw items
   Drawing each owner-draw item

Chapter 7: Working with graphics and multimedia
Overview of graphics programming
   Refreshing the screen
   Types of graphic objects
   Common properties and methods of Canvas
   Using the properties of the Canvas object 
      Using pens
      Using brushes
      Reading and setting pixels
   Using Canvas methods to draw graphic objects
      Drawing lines and polylines
      Drawing shapes
   Handling multiple drawing objects in your application
      Keeping track of which drawing tool to use
      Changing the tool with speed buttons
      Using drawing tools
   Drawing on a graphic
      Making scrollable graphics
      Adding an image control
   Loading and saving graphics files
      Loading a picture from a file
      Saving a picture to a file
      Replacing the picture
   Using the Clipboard with graphics
      Copying graphics to the Clipboard
      Cutting graphics to the Clipboard
      Pasting graphics from the Clipboard
   Rubber banding example
      Responding to the mouse
      Adding a field to a form object to track mouse actions
      Refining line drawing
Working with multimedia
   Adding silent video clips to an application
      Example of adding silent video clips
   Adding audio and/or video clips to an application
      Example of adding audio and/or video clips

Chapter 8: Writing multi-threaded applications
Defining thread objects
   Initializing the thread
      Assigning a default priority
      Indicating when threads are freed
   Writing the thread function
      Using the main VCL thread
      Using thread-local variables
      Checking for termination by other threads
   Writing clean-up code
Coordinating threads
   Avoiding simultaneous access
      Locking objects
      Using critical sections
      Using the multi-read exclusive-write synchronizer
      Other techniques for sharing memory
   Waiting for other threads
      Waiting for a thread to finish executing
      Waiting for a task to be completed
Executing thread objects
   Overriding the default priority
   Starting and stopping threads
Using threads in distributed applications
   Using threads in message-based servers
   Using threads with distributed objects
      Writing applications (.EXEs)
      Writing Libraries
Debugging multi-threaded applications

Chapter 9: Working with packages and components
Why use packages?
   Packages and standard DLLs
Runtime packages
   Using packages in an application
   Dynamically loading packages
   Deciding which runtime packages to use
   Custom packages
Design-time packages
   Installing component packages
Creating and editing packages
   Creating a package
   Editing an existing package
   Editing package source files manually
   Understanding the structure of a package
      Naming packages
      The Requires clause
      The Contains clause
   Compiling packages
      Package-specific compiler directives
      Using the command-line compiler and linker
      Package files created by a successful compilation
Deploying packages
   Deploying applications that use packages
   Distributing packages to other developers
   Package collection files

Chapter 10: Creating international applications
Internationalization and localization
   Internationalization
   Localization
Internationalizing applications
   Enabling application code
       Character sets
      OEM and ANSI character sets
      Double byte character sets
      Wide characters
      Including bi-directional functionality in applications
      BiDiMode property
      Locale-specific features
   Designing the user interface
      Text
      Graphic images
      Formats and sort order
      Keyboard mappings
   Isolating resources
   Creating resource DLLs
   Using resource DLLs
   Dynamic switching of resource DLLs
Localizing applications
   Localizing resources

Chapter 11: Deploying applications
Deploying general applications
   Using installation programs
      Identifying application files
      Application files, listed by file name extension
      Package files
      ActiveX controls
      Helper applications
      DLL locations
Deploying database applications
   Providing the database engine
      Borland Database Engine
      Third-party database engines
      SQL Links
   Multi-tiered Distributed Application Services (MIDAS)
Deploying Web applications
Programming for varying host environments
   Screen resolutions and color depths
      Considerations when not dynamically resizing
      Considerations when dynamically resizing forms and controls
      Accommodating varying color depths
   Fonts
   Windows versions
Software license requirements
   DEPLOY.TXT
   README.TXT
   No-nonsense license agreement
   Third-party product documentation

Part II: Developing database applications

Chapter 12: Designing database applications
Using databases
   Types of databases
      Local databases
      Remote database servers
   Database security
   Transactions
   Data Dictionary
   Referential integrity, stored procedures, and triggers
Database architecture
   Planning for scalability
   Single-tiered database applications
   Two-tiered database applications
   Multi-tiered database applications
Designing the user interface
   Displaying a single record
   Displaying multiple records
   Analyzing data
   Selecting what data to show
   Writing reports

Chapter 13: Building one- and two-tiered applications
BDE-based applications
   BDE-based architecture
      Understanding databases and datasets
      Using sessions
   Connecting to databases
   Using transactions
      Explicitly controlling transactions
      Using a database component for transactions
      Using the TransIsolation property
      Using passthrough SQL
      Using local transactions
   Caching updates
   Creating and restructuring database tables
ADO-based applications
   ADO-based architecture
      Understanding ADO databases and datasets
   Connecting to ADO databases
   Retrieving data
   Creating and restructuring ADO database tables
Flat-file database applications
   Creating the datasets
      Creating a new dataset using persistent fields
      Creating a dataset using field and index definitions
      Creating a dataset based on an existing table
   Loading and saving data
   Using the briefcase model
Scaling up to a three-tiered application

Chapter 14: Creating multi-tiered applications
Advantages of the multi-tiered database model
Understanding MIDAS technology
   Overview of a MIDAS-based multi-tiered application
   The structure of the client application
   The structure of the application server
      Using MTS
      Pooling remote data modules
      Using the IAppServer interface
   Choosing a connection protocol
      Using DCOM connections
      Using Socket connections
      Using Web connections
      Using OLEnterprise
      Using CORBA connections
Building a multi-tiered application
Creating the application server
   Setting up the remote data module
      Configuring TRemoteDataModule
      Configuring TMTSDataModule
      Configuring TCorbaDataModule
   Creating a data provider for the application server
   Extending the application server's interface
      Adding callbacks to the application server's interface
      Extending the application server's interface when using MTS
Creating the client application
   Connecting to the application server
      Specifying a connection using DCOM
      Specifying a connection using sockets
      Specifying a connection using HTTP
      Specifying a connection using OLEnterprise
      Specifying a connection using CORBA
      Brokering connections
   Managing server connections
      Connecting to the server
      Dropping or changing a server connection
   Calling server interfaces
Managing transactions in multi-tiered applications
Supporting master/detail relationships
Supporting state information in remote data modules
Writing MIDAS Web applications
   Distributing a client application as an ActiveX control
      Creating an Active Form for the client application
   Building Web applications using InternetExpress
      Building an InternetExpress application
      Using the javascript libraries
      Granting permission to access and launch the application server
   Using an XML broker
      Fetching XML data packets
      Applying updates from XML delta packets
   Creating Web pages with a MIDAS page producer
      Using the Web page editor
      Setting Web item properties
      Customizing the MIDAS page producer template

Chapter 15: Using provider components
Determining the source of data
Choosing how to apply updates
Controlling what information is included in data packets
   Specifying what fields appear in data packets
   Setting options that influence the data packets
   Adding custom information to data packets
Responding to client data requests
Responding to client update requests
   Editing delta packets before updating the database
   Influencing how updates are applied
   Screening individual updates
   Resolving update errors on the provider
   Applying updates to datasets that do not represent a single table
Responding to client-generated events
Handling server constraints

Chapter 16: Managing database sessions
Working with a session component
   Using the default session
   Creating additional sessions
   Naming a session
   Activating a session
   Customizing session start-up
   Specifying default database connection behavior
   Creating, opening, and closing database connections
      Closing a single database connection
      Closing all database connections
   Dropping temporary database connections
   Searching for a database connection
   Retrieving information about a session
   Working with BDE aliases
      Specifying alias visibility
      Making session aliases visible to other sessions and applications
      Determining known aliases, drivers, and parameters
      Creating, modifying, and deleting aliases
   Iterating through a session's database components
   Specifying Paradox directory locations
      Specifying the control file location
      Specifying a temporary files location
   Working with password-protected Paradox and dBase tables
      Using the AddPassword method
      Using the RemovePassword and RemoveAllPasswords methods
      Using the GetPassword method and OnPassword event
Managing multiple sessions
Using a session component in data modules

Chapter 17: Connecting to databases
Understanding persistent and temporary database components
   Using temporary database components
   Creating database components at design time
   Creating database components at runtime
Controlling connections
   Associating a database component with a session
   Specifying a BDE alias
   Setting BDE alias parameters
   Controlling server login
   Connecting to a database server
   Special considerations when connecting to a remote server
      Working with network protocols
      Using ODBC
   Disconnecting from a database server
   Closing datasets without disconnecting from a server
   Iterating through a database component's datasets
Understanding database and session component interactions
Using database components in data modules
Executing SQL statements from a TDatabase component
   Executing SQL statements without result sets
   Executing SQL statements with result sets
   Executing parameterized SQL statements

Chapter 18: Understanding datasets
What is TDataSet?
Types of datasets
Opening and closing datasets
Determining and setting dataset states
   Inactivating a dataset
   Browsing a dataset
   Enabling dataset editing
   Enabling insertion of new records
   Enabling index-based searches and ranges on tables
   Calculating fields
   Filtering records
   Updating records
Navigating datasets
   Using the First and Last methods
   Using the Next and Prior methods
   Using the MoveBy method
   Using the Eof and Bof properties
      Eof
      Bof
   Marking and returning to records
Searching datasets
   Using Locate
   Using Lookup
Displaying and editing a subset of data using filters
   Enabling and disabling filtering
   Creating filters
   Setting the Filter property
   Writing an OnFilterRecord event handler
      Switching filter event handlers at runtime
   Setting filter options
   Navigating records in a filtered dataset
Modifying data
   Editing records
   Adding new records
      Inserting records
      Appending records
   Deleting records
   Posting data to the database
   Canceling changes
   Modifying entire records
Using dataset events
   Aborting a method
   Using OnCalcFields
Using BDE-enabled datasets
   Overview of BDE-enablement
   Handling database and session connections
      Using the DatabaseName and SessionName properties
      Working with BDE handle properties
   Using cached updates
   Caching BLOBs

Chapter 19: Working with field components
Understanding field components
   Dynamic field components
   Persistent field components
Creating persistent fields
Arranging persistent fields
Defining new persistent fields
   Defining a data field
   Defining a calculated field
   Programming a calculated field
   Defining a lookup field
   Defining an aggregate field
   Deleting persistent field components
Setting persistent field properties and events
   Setting display and edit properties at design time
   Setting field component properties at runtime
   Creating attribute sets for field components
   Associating attribute sets with field components
   Removing attribute associations
   Controlling and masking user input
   Using default formatting for numeric, date, and time fields
   Handling events
Working with field component methods at runtime
Displaying, converting, and accessing field values
   Displaying field component values in standard controls
   Converting field values
   Accessing field values with the default dataset property
   Accessing field values with a dataset's Fields property
   Accessing field values with a dataset's FieldByName method
Checking a field's current value
Setting a default value for a field
Working with constraints
   Creating a custom constraint
   Using server constraints
Using object fields
   Displaying ADT and array fields
   Working with ADT fields
      Accessing ADT field values
   Working with array fields
      Accessing array field values
   Working with dataset fields
      Displaying dataset fields
      Accessing data in a nested dataset
   Working with reference fields
      Displaying reference fields
      Accessing data in a reference field

Chapter 20: Working with tables
Using table components
Setting up a table component
   Specifying a database location
   Specifying a table name
   Specifying the table type for local tables
   Opening and closing a table
Controlling read/write access to a table
Searching for records
   Searching for records based on indexed fields
      Executing a search with Goto methods
      Executing a search with Find methods
   Specifying the current record after a successful search
   Searching on partial keys
   Searching on alternate indexes
   Repeating or extending a search
Sorting records
   Retrieving a list of available indexes with GetIndexNames
   Specifying an alternative index with IndexName
      Specifying a dBASE index file
   Specifying sort order for SQL tables
      Specifying fields with IndexFieldNames
   Examining the field list for an index
Working with a subset of data
   Understanding the differences between ranges and filters
   Creating and applying a new range
      Setting the beginning of a range
      Setting the end of a range
      Setting start- and end-range values
      Specifying a range based on partial keys
      Including or excluding records that match boundary values
      Applying a range
      Canceling a range
   Modifying a range
      Editing the start of a range
      Editing the end of a range
Deleting all records in a table
Deleting a table
Renaming a table
Creating a table
Importing data from another table
Using TBatchMove
   Creating a batch move component
   Specifying a batch move mode
      Appending
      Updating
      Appending and updating
      Copying
      Deleting
   Mapping data types
   Executing a batch move
   Handling batch move errors
Synchronizing tables linked to the same database table
Creating master/detail forms
   Building an example master/detail form
Working with nested tables
   Setting up a nested table component

Chapter 21: Working with queries
Using queries effectively
   Queries for desktop developers
   Queries for server developers
What databases can you access with a query component?
Using a query component: an overview
Specifying the SQL statement to execute
   Specifying the SQL property at design time
   Specifying an SQL statement at runtime
      Setting the SQL property directly
      Loading the SQL property from a file
      Loading the SQL property from string list object
Setting parameters
   Supplying parameters at design time
   Supplying parameters at runtime
   Using a data source to bind parameters
Executing a query
   Executing a query at design time
   Executing a query at runtime
      Executing a query that returns a result set
      Executing a query without a result set
Preparing a query 
Unpreparing a query to release resources
Creating heterogeneous queries
Improving query performance
   Disabling bi-directional cursors
Working with result sets
   Enabling editing of a result set
   Local SQL requirements for a live result set
      Restrictions on live queries
   Remote server SQL requirements for a live result set
   Restrictions on updating a live result set
   Updating a read-only result set

Chapter 22: Working with stored procedures
When should you use stored procedures?
Using a stored procedure
   Creating a stored procedure component
   Creating a stored procedure
   Preparing and executing a stored procedure
   Using stored procedures that return result sets
      Retrieving a result set with a TQuery
      Retrieving a result set with a TStoredProc
   Using stored procedures that return data using parameters
      Retrieving individual values with a TQuery
      Retrieving individual values with a TStoredProc
   Using stored procedures that perform actions on data
      Executing an action stored procedure with a TQuery
      Executing an action stored procedure with a TStoredProc
Understanding stored procedure parameters
   Using input parameters
   Using output parameters
   Using input/output parameters
   Using the result parameter
   Accessing parameters at design time
   Setting parameter information at design time
   Creating parameters at runtime
   Binding parameters
Viewing parameter information at design time
Working with Oracle overloaded stored procedures

Chapter 23: Working with ADO components
Overview of ADO components
Connecting to ADO data stores
   Connecting to a data store using TADOConnection
      Using a TADOConnection versus a dataset's ConnectionString
      Specifying the connection
      Accessing the connection object
      Activating and deactivating the connection
      Determining what a connection component is doing
   Fine-tuning a connection
      Specifying connection attributes
      Controlling timeouts
      Controlling the connection login
   Listing tables and stored procedures
      Accessing the connection's datasets
      Accessing the connection's commands
      Listing available tables
      Listing available stored procedures
   Working with (connection) transactions
      Using transaction methods
      Using transaction events
Using ADO datasets
   Features common to all ADO dataset components
      Modifying data
      Navigating in a dataset
      Using visual data-aware controls
      Connecting to a data store using ADO dataset components
      Working with record sets
      Using batch updates
      Loading data from and saving data to files
      Using parameters in commands
   Using TADODataSet
      Retrieving a dataset using a command
   Using TADOTable
      Specifying the table to use
   Using TADOQuery
      Specifying SQL statements
      Executing SQL statements
   Using TADOStoredProc
      Specifying the stored procedure
      Executing the stored procedure
      Using parameters with stored procedures
Executing commands
   Specifying the command
   Using the Execute method
   Canceling commands
   Retrieving result sets with commands
   Handling command parameters

Chapter 24: Creating and using a client dataset
Working with data using a client dataset
   Navigating data in client datasets
   Limiting what records appear
   Representing master/detail relationships
   Constraining data values
   Making data read-only
   Editing data
      Undoing changes
      Saving changes
   Sorting and indexing
      Adding a new index
      Deleting and switching indexes
      Using indexes to group data
      Indexing on the fly
   Representing calculated values
      Using internally calculated fields in client datasets
   Using maintained aggregates
       Specifying aggregates
      Aggregating over groups of records
      Obtaining aggregate values
   Adding application-specific information to the data
Copying data from another dataset
   Assigning data directly
   Cloning a client dataset cursor
Using a client dataset with a data provider
   Specifying a data provider
   Getting parameters from the application server
   Passing parameters to the application server
      Sending query or stored procedure parameters
      Limiting records with parameters
   Overriding the dataset on the application server
   Requesting data from an application server
   Handling constraints
      Handling constraints from the server
      Adding custom constraints
   Updating records
      Applying updates
      Reconciling update errors
   Refreshing records
   Communicating with providers using custom events
Using a client dataset with flat-file data
   Creating a new dataset
   Loading data from a file or stream
   Merging changes into data
   Saving data to a file or stream

Chapter 25: Working with cached updates
Deciding when to use cached updates
Using cached updates
   Enabling and disabling cached updates
   Fetching records
   Applying cached updates
      Applying cached updates with a database component method
      Applying cached updates with dataset component methods
      Applying updates for master/detail tables
   Canceling pending cached updates
      Cancelling pending updates and disabling further cached updates
      Canceling pending cached updates
      Canceling updates to the current record 
   Undeleting cached records
   Specifying visible records in the cache
   Checking update status
Using update objects to update a dataset
   Specifying the UpdateObject property for a dataset
      Using a single update object
      Using multiple update objects
   Creating SQL statements for update components
      Creating SQL statements at design time
      Understanding parameter substitution in update SQL statements
      Composing update SQL statements
      Using an update component's Query property
      Using the DeleteSQL, InsertSQL, and ModifySQL properties
   Executing update statements
      Calling the Apply method
      Calling the SetParams method
      Calling the ExecSQL method
   Using dataset components to update a dataset
Updating a read-only result set
Controlling the update process
   Determining if you need to control the updating process
   Creating an OnUpdateRecord event handler
Handling cached update errors
   Referencing the dataset to which to apply updates
   Indicating the type of update that generated an error
   Specifying the action to take
   Working with error message text
   Accessing a field's OldValue, NewValue, and CurValue properties

Chapter 26: Using data controls
Using common data control features
   Associating a data control with a dataset
   Editing and updating data
      Enabling editing in controls on user entry
      Editing data in a control
   Disabling and enabling data display
   Refreshing data display
   Enabling mouse, keyboard, and timer events
Using data sources
   Using TDataSource properties
      Setting the DataSet property
      Setting the Name property
      Setting the Enabled property
      Setting the AutoEdit property
   Using TDataSource events
      Using the OnDataChange event
      Using the OnUpdateData event
      Using the OnStateChange event
Controls that represent a single field
   Displaying data as labels
   Displaying and editing fields in an edit box
   Displaying and editing text in a memo control
   Displaying and editing text in a rich edit memo control
   Displaying and editing graphics fields in an image control
   Displaying and editing data in list and combo boxes
      Displaying and editing data in a list box
      Displaying and editing data in a combo box
   Displaying and editing data in lookup list and combo boxes
      Specifying a list based on a lookup field
      Specifying a list based on a secondary data source
      Setting lookup list and combo box properties
      Searching incrementally for list item values
   Handling Boolean field values with check boxes
   Restricting field values with radio controls
Viewing and editing data with TDBGrid
   Using a grid control in its default state
   Creating a customized grid
      Understanding persistent columns
      Determining the source of a column property at runtime
      Creating persistent columns
      Deleting persistent columns
      Arranging the order of persistent columns
      Defining a lookup list column
      Defining a pick list column
      Putting a button in a column
      Setting column properties at design time
      Restoring default values to a column
   Displaying ADT and array fields
   Setting grid options
   Editing in the grid
   Rearranging column order at design time
   Rearranging column order at runtime
      Controlling grid drawing
   Responding to user actions at runtime
Creating a grid that contains other data-aware controls
Navigating and manipulating records
   Choosing navigator buttons to display
      Hiding and showing navigator buttons at design time
      Hiding and showing navigator buttons at runtime
   Displaying fly-over help
   Using a single navigator for multiple datasets

Chapter 27: Using decision support components
Overview
About crosstabs
   One-dimensional crosstabs
   Multidimensional crosstabs
Guidelines for using decision support components
Using datasets with decision support components
   Creating decision datasets with TQuery or TTable
   Creating decision datasets with the Decision Query editor
      Using the Decision Query editor
   Decision query properties
Using decision cubes
   Decision cube properties and events
   Using the Decision Cube editor
      Viewing and changing dimension settings
      Setting the maximum available dimensions and summaries
      Viewing and changing design options
Using decision sources
   Properties and events
Using decision pivots
   Decision pivot properties
Creating and using decision grids
   Creating decision grids
   Using decision grids
      Opening and closing decision grid fields
      Reorganizing rows and columns in decision grids
      Drilling down for detail in decision grids
      Limiting dimension selection in decision grids
   Decision grid properties
Creating and using decision graphs
   Creating decision graphs
   Using decision graphs
   The decision graph display
   Customizing decision graphs
      Setting decision graph template defaults
      Customizing decision graph series
Decision support components at runtime
   Decision pivots at runtime
   Decision grids at runtime
   Decision graphs at runtime
Decision support components and memory control
   Setting maximum dimensions, summaries, and cells
   Setting dimension state
   Using paged dimensions

Part III: Writing distributed applications

Chapter 28: Writing CORBA applications
Overview of a CORBA application
   Understanding stubs and skeletons
   Using Smart Agents
   Activating server applications
   Binding interface calls dynamically
Writing CORBA servers
   Using the CORBA wizards
   Defining object interfaces
   Automatically generated code
   Registering server interfaces
      Registering interfaces with the Interface Repository
      Registering interfaces with the Object Activation Daemon
Writing CORBA clients
   Using stubs
   Using the dynamic invocation interface
      Obtaining the interface
      Calling interfaces with DII
Customizing CORBA applications
   Displaying objects in the user interface
   Exposing and hiding CORBA objects
   Passing client information to server objects
Deploying CORBA applications
   Configuring Smart Agents
      Starting the Smart Agent
      Configuring ORB domains
      Connecting Smart Agents on different local networks

Chapter 29: Creating Internet server applications
Terminology and standards
   Parts of a Uniform Resource Locator
      URI vs. URL
   HTTP request header information
HTTP server activity
   Composing client requests
   Serving client requests
   Responding to client requests
Web server applications
   Types of Web server applications
      ISAPI and NSAPI
      CGI stand-alone
      Win-CGI stand-alone
   Creating Web server applications
   The Web module
   The Web Application object
The structure of a Web server application
The Web dispatcher
   Adding actions to the dispatcher
   Dispatching request messages
Action items
   Determining when action items fire
      The target URL
      The request method type
      Enabling and disabling action items
      Choosing a default action item
   Responding to request messages with action items
      Sending the response
      Using multiple action items
Accessing client request information
   Properties that contain request header information
      Properties that identify the target
      Properties that describe the Web client
      Properties that identify the purpose of the request
      Properties that describe the expected response
      Properties that describe the content
   The content of HTTP request messages
Creating HTTP response messages
   Filling in the response header
      Indicating the response status
      Indicating the need for client action
      Describing the server application
      Describing the content
   Setting the response content
   Sending the response
Generating the content of response messages
   Using page producer components
      HTML templates
      Specifying the HTML template
      Converting HTML-transparent tags
      Using page producers from an action item
      Chaining page producers together
Using database information in responses
   Adding a session to the Web module
   Representing database information in HTML
      Using dataset page producers
      Using table producers
      Specifying the table attributes
      Specifying the row attributes
      Specifying the columns
      Embedding tables in HTML documents
      Setting up a dataset table producer
      Setting up a query table producer
Debugging server applications
   Debugging ISAPI and NSAPI applications
      Debugging under Windows NT
      Debugging with a Microsoft IIS server
      Debugging under MTS
      Debugging with a Windows 95 Personal Web Server
      Debugging with Netscape Server Version 2.0
   Debugging CGI and Win-CGI applications
      Simulating the server
      Debugging as a DLL

Chapter 30: Working with sockets
Implementing services
   Understanding service protocols
      Communicating with applications
   Services and ports
Types of socket connections
   Client connections
   Listening connections
   Server connections
Describing sockets
   Describing the host
      Choosing between a host name and an IP address
   Using ports
Using socket components
   Using client sockets
      Specifying the desired server
      Forming the connection
      Getting information about the connection
      Closing the connection
   Using server sockets
      Specifying the port
      Listening for client requests
      Connecting to clients
      Getting information about connections
      Closing server connections
Responding to socket events
   Error events
   Client events
   Server events
      Events when listening
      Events with client connections
Reading and writing over socket connections
   Non-blocking connections
      Reading and writing events
   Blocking connections
      Using threads with blocking connections
      Using TWinSocketStream
      Writing client threads
      Writing server threads

Part IV: Creating custom components

Chapter 31: Overview of component creation
Visual Component Library
Components and classes
How do you create components?
   Modifying existing controls
   Creating windowed controls
   Creating graphic controls
   Subclassing Windows controls
   Creating nonvisual components
What goes into a component?
   Removing dependencies
   Properties, methods, and events
      Properties
      Events
      Methods
   Graphics encapsulation
   Registration
Creating a new component
   Using the Component wizard
   Creating a component manually
      Creating a unit file
      Deriving the component
      Registering the component
Testing uninstalled components

Chapter 32: Object-oriented programming for component writers
Defining new classes
   Deriving new classes
      To change class defaults to avoid repetition
      To add new capabilities to a class
   Declaring a new component class
Ancestors, descendants, and class hierarchies
Controlling access
   Hiding implementation details
   Defining the component writer's interface
   Defining the runtime interface
   Defining the design-time interface
Dispatching methods
   Static methods
   Virtual methods
      Overriding methods
      Dynamic methods
Abstract class members
Classes and pointers

Chapter 33: Creating properties
Why create properties?
Types of properties
Publishing inherited properties
Defining properties
   The property declaration
   Internal data storage
   Direct access
   Access methods
      The read method
      The write method
   Default property values
      Specifying no default value
Creating array properties
Storing and loading properties
   Using the store-and-load mechanism
   Specifying default values
   Determining what to store
   Initializing after loading
   Storing and loading unpublished properties
      Creating methods to store and load property values
      Overriding the DefineProperties method

Chapter 34: Creating events
What are events?
   Events are method pointers
   Events are properties
   Event types are method-pointer types
      Event-handler types are procedures
   Event handlers are optional
Implementing the standard events
   Identifying standard events
      Standard events for all controls
      Standard events for standard controls
   Making events visible
   Changing the standard event handling
Defining your own events
   Triggering the event
      Two kinds of events
   Defining the handler type
      Simple notifications
      Event-specific handlers
      Returning information from the handler
   Declaring the event
      Event names start with "On"
   Calling the event
      Empty handlers must be valid
      Users can override default handling

Chapter 35: Creating methods
Avoiding dependencies
Naming methods
Protecting methods
   Methods that should be public
   Methods that should be protected
   Abstract methods
Making methods virtual
Declaring methods

Chapter 36: Using graphics in components
Overview of graphics
Using the canvas
Working with pictures
   Using a picture, graphic, or canvas
   Loading and storing graphics
   Handling palettes
      Specifying a palette for a control
      Responding to palette changes
Off-screen bitmaps
   Creating and managing off-screen bitmaps
   Copying bitmapped images
Responding to changes

Chapter 37: Handling messages
Understanding the message-handling system
   What's in a Windows message?
   Dispatching messages
      Tracing the flow of messages
Changing message handling
   Overriding the handler method
   Using message parameters
   Trapping messages
Creating new message handlers
   Defining your own messages
      Declaring a message identifier
      Declaring a message-record type
   Declaring a new message-handling method

Chapter 38: Making components available at design time
Registering components
   Declaring the Register procedure
   Writing the Register procedure
      Specifying the components
      Specifying the palette page
      Using the RegisterComponents function
Adding palette bitmaps
Providing Help for your component
   Creating the Help file
      Creating the entries
      Making component help context-sensitive
      Adding component help files
Adding property editors
   Deriving a property-editor class
   Editing the property as text
      Displaying the property value
      Setting the property value
   Editing the property as a whole
   Specifying editor attributes
   Registering the property editor
Adding component editors
   Adding items to the context menu
      Specifying menu items
      Implementing commands
   Changing the double-click behavior
   Adding clipboard formats
   Registering the component editor
Property categories
   Registering one property at a time
   Registering multiple properties at once
   Property category classes
      Built-in property categories
      Deriving new property categories
   Using the IsPropertyInCategory function
Compiling components into packages

Chapter 39: Modifying an existing component
Creating and registering the component
Modifying the component class
   Overriding the constructor
   Specifying the new default property value

Chapter 40: Creating a graphic component
Creating and registering the component
Publishing inherited properties
Adding graphic capabilities
   Determining what to draw
      Declaring the property type
      Declaring the property
      Writing the implementation method
   Overriding the constructor and destructor
      Changing default property values
   Publishing the pen and brush
      Declaring the class fields
      Declaring the access properties
      Initializing owned classes
      Setting owned classes' properties
   Drawing the component image
   Refining the shape drawing

Chapter 41: Customizing a grid
Creating and registering the component
Publishing inherited properties
Changing initial values
Resizing the cells
Filling in the cells
   Tracking the date
      Storing the internal date
      Accessing the day, month, and year
      Generating the day numbers
      Selecting the current day
Navigating months and years
Navigating days
   Moving the selection
   Providing an OnChange event
   Excluding blank cells

Chapter 42: Making a control data aware
Creating a data-browsing control
   Creating and registering the component
   Making the control read-only
      Adding the ReadOnly property
      Allowing needed updates
   Adding the data link
      Declaring the class field
      Declaring the access properties
      An example of declaring access properties
      Initializing the data link
   Responding to data changes
Creating a data-editing control
   Changing the default value of FReadOnly
   Handling mouse-down and key-down messages
      Responding to mouse-down messages
      Responding to key-down messages
   Updating the field data-link class
   Modifying the Change method
   Updating the dataset

Chapter 43: Making a dialog box a component
Defining the component interface
Creating and registering the component
Creating the component interface
   Including the form unit
   Adding interface properties
   Adding the Execute method
Testing the component

Part V: Developing COM-based applications

Chapter 44: Overview of COM technologies
      COM as a specification and implementation
      COM extensions
Parts of a COM application
   COM interfaces
      The fundamental COM interface, IUnknown
      COM interface pointers
   COM servers
      CoClasses and class factories
      In-process, out-of-process, and remote servers
      The marshaling mechanism
   COM clients
COM extensions
   Automation servers and controllers
   ActiveX controls
   Type libraries
      The content of type libraries
      Creating type libraries
      When to use type libraries
      Accessing type libraries
      Benefits of using type libraries
      Using type library tools
   Active Server Pages
   Active Documents
   Visual cross-process objects
Implementing COM objects with wizards

Chapter 45: Creating a simple COM object
Overview of creating a COM object
Designing a COM object
Creating a COM object with the COM object wizard
COM object instancing types
Choosing a threading model
   Writing an object that supports the free threading model
   Writing an object that supports the apartment threading model
Registering a COM object
Testing a COM object

Chapter 46: Creating an Automation controller
Creating an Automation controller by importing a type library
   Handling events in an automation controller
   Connecting to and disconnecting from a server
   Controlling an Automation server using a dual interface
   Controlling an Automation server using a dispatch interface
   Example: Printing a document with Microsoft Word
      Step 1: Prepare Delphi for this example
      Step 2: Import the Word type library
      Step 3: Use a VTable or dispatch interface object to control Microsoft Word
      Step 4: Clean-up the example
   Getting more information

Chapter 47: Creating an Automation server
Creating an Automation object for an application
Managing events in your Automation object
Exposing an application's properties, methods, and events
   Exposing a property for Automation
   Exposing a method for Automation
   Exposing an event for Automation
   Getting more information
Registering an application as an Automation server
   Registering an in-process server
   Registering an out-of-process server
Testing and debugging the application
Automation interfaces
   Dual interfaces
   Dispatch interfaces
   Custom interfaces
Marshaling data
   Automation compatible types 
   Type restrictions for automatic marshaling
   Custom marshaling

Chapter 48: Creating an ActiveX control
Overview of ActiveX control creation
   Elements of an ActiveX control
      VCL control
      Type library
      Properties, methods, and events
      Property page
Designing an ActiveX control
Generating an ActiveX control from a VCL control
Licensing ActiveX controls
Generating an ActiveX control based on a VCL form
Working with properties, methods, and events in an ActiveX control
   Adding additional properties, methods, and events
      How Delphi adds properties
      How Delphi adds methods
      How Delphi adds events
   Enabling simple data binding with the type library
   Enabling simple data binding of ActiveX controls in the Delphi container
Creating a property page for an ActiveX control
   Creating a new property page
   Adding controls to a property page
   Associating property page controls with ActiveX control properties
      Updating the property page
      Updating the object
   Connecting a property page to an ActiveX control
Exposing properties of an ActiveX control
Registering an ActiveX control
Testing an ActiveX control
Deploying an ActiveX control on the Web
   Setting options
      Web Deploy Options Default checkbox
      INF file
      Option combinations
   Project tab
   Packages tab
      Packages used by this project
      CAB options
      Output options
      Directory and URL options
   Additional Files tab
      Files associated with project
      CAB options
      Output options
      Directory and URL options
   Code Signing tab
      Required information
      Optional information
      Timestamp server
      Cryptographic digest algorithm

Chapter 49: Creating an Active Server Page
Creating an Active Server Page object
   Creating ASPs for in-process or out-of-process servers
Registering an application as an Active Server Page object
   Registering an in-process server
   Registering an out-of-process server
Testing and debugging the Active Server Page application

Chapter 50: Working with type libraries
Type Library editor
   Toolbar
   Object list pane
   Status bar
   Pages of type information
      Attributes page
      Text page
      Flags page
Type library information
   Attributes page for a type library
   Uses page for a type library
   Flags page for a type library
Interface pages
   Attributes page for an interface
   Interface flags
   Interface members
      Interface methods
      Interface properties
      Property and method parameters page
Dispatch type information
   Attributes page for dispatch
   Dispatch flags page
   Dispatch members
CoClass pages
   Attributes page for a CoClass
   CoClass Implements page
   CoClass flags
Enumeration type information
   Attributes page for an enum
   Enumeration members
Alias type information
   Attributes page for an alias
Record type information
   Attributes page for a record
   Record members
Union type information
   Attributes page for a union
   Union members
Module type information
   Attributes page for a module
   Module members
      Module methods
      Module constants
Creating new type libraries
   Valid types
      SafeArrays
   Using Object Pascal or IDL syntax
      Attribute specifications
      Interface syntax
      Dispatch interface syntax
      CoClass syntax
      Enum syntax
      Alias syntax
      Record syntax
      Union syntax
      Module syntax
   Creating a new type library
   Opening an existing type library
   Adding an interface to the type library
   Adding properties and methods to an interface or dispinterface
   Adding a CoClass to the type library
   Adding an enumeration to the type library
   Saving and registering type library information
      Apply Updates dialog
      Saving a type library
      Refreshing the type library
      Registering the type library
      Exporting an IDL file
Deploying type libraries

Chapter 51: Creating MTS objects
Microsoft Transaction Server components
   Requirements for an MTS component
Managing resources with just-in-time activation and resource pooling
   Just-in-time activation
   Resource pooling
   Releasing resources
   Object pooling
   Accessing the object context
MTS transaction support
   Transaction attributes
   Object context holds transaction attribute
   Stateful and stateless objects
   Enabling multiple objects to support transactions
   MTS or client-controlled transactions
   Advantage of transactions
   Transaction timeout
Role-based security
Resource dispensers
   BDE resource dispenser
   Shared property manager
      Example: Sharing properties among MTS object instances
      Tips for using the Shared Property Manager
Base clients and MTS components
MTS underlying technologies, COM and DCOM
Overview of creating MTS objects
Using the MTS Object wizard
   Choosing a threading model for an MTS object
   MTS activities
Setting the transaction attribute
Passing object references
      Using the SafeRef method
      Callbacks
Setting up a transaction object on the client side
Setting up a transaction object on the server side
Debugging and testing MTS objects
Installing MTS objects into an MTS package
Administering MTS objects with the MTS Explorer
Using MTS documentation

© 1999 by INPRISE Corporation, Inc.
All Rights Reserved