(eBook) - Borland Delphi SQL User Guide.PDF

(605 KB) Pobierz
SQL Links User's Guide
SQL Links for Windows
Delphi for Windows
Introduction
Copyright
Agreement
Borland SQL Links for Windows enables users to access and manipulate SQL data using
features in Borland applications.
Supported Borland applications
Any Borland application that supports the Borland Database Engine (BDE) can use
Borland SQL Links. The cornerstone of all Borland Windows-based database products,
the BDE (also known as IDAPI, the Integrated Database Application Programming
Interface) supports Paradox for Windows, dBASE for Windows, Delphi 95, and custom
applications built using the BDE API.
For the purpose of this manual, we refer to all supported Borland database products and
custom applications as BDE applications.
Supported databases
Drivers in the SQL Links product package support InterBase, Informix, ORACLE, and
SYBASE and Microsoft SQL Server databases.
Where to find information
This book describes how Borland SQL Links for Windows works, how to install one or
more SQL Link drivers, and how to set up your supported Borland application to access
SQL data. It includes appendices which provides driver-specific information on
required workstation software, configuration parameters, troubleshooting, and data
translation.
It is meant to be used with:
• your BDE application user documentation, which describes how to use your product
to access both local (workstation-based) and SQL server data
• your BDE application programming documentation, which describes how to write
custom applications to use with both local and SQL server data
Introduction 1
User’s Guide
121279796.004.png 121279796.005.png 121279796.006.png
• your SQL server documentation
Depending on how you plan to work with SQL data, you may not need to read through
all of the above books. The following table shows what kind of information each type of
SQL Links user needs, and where to find it in SQL Links and related documentation.
Table Intro.1 Where to find information on SQL Links and related topics
Who you are
What you do
Information you need
Where to find it
BDE application end-user
(no knowledge of SQL)
Use Borland desktop or
custom applications to
work with both local and
SQL data (graphical user
interface only)
How to install SQL Links
Borland SQL Links for
Windows User’s Guide
Borland SQL Links for
Windows User’s Guide
BDE application user
documentation
How to create one or more
aliases to the SQL database
How to connect to the SQL
database through your
BDE application
How to work with local and
SQL data through your
Borland desktop graphical
user interface (GUI)
BDE application user
documentation
BDE application end-user
(knows SQL)
Use supported application
to pass SQL statements to
local and/or SQL data
How to install SQL Links
Borland SQL Links for
Windows User’s Guide
Borland SQL Links for
Windows User’s Guide
BDE application user
documentation
How to create one or more
aliases to the SQL database
How to connect to the SQL
database through your
BDE application
How to frame SQL
statements the server can
accept and work with
How to pass SQL
statements from your BDE
application directly to the
SQL server
SQL server documentation
BDE application user
documentation and/or
online Help
BDE application
developer
Adapt existing applications
(or write new ones) for use
in a mixed workstation/
SQL environment
How to install SQL Links
Borland SQL Links for
Windows User’s Guide
How to create one or more
aliases to the SQL database
Borland SQL Links for
Windows User’s Guide
Differences between
workstation databases and
SQL databases
Product-specific online
Help for SQL and upsizing
issues
Programming tools
available to create
applications that will work
in a mixed workstation/
SQL environment
Product-specific online
Help for SQL and upsizing
issues, BDE application
programmer’s reference
Summary information on
data type translation,
language driver usage, and
other general factors that
influence the interaction
between the Borland
application and the server
Driver-specific appendix in
the Borland SQL Links
User’s Guide
How to frame SQL
statements the server can
accept and work with
SQL server documentation
2 SQL Links User’s Guide
121279796.007.png
Other important sources of information include the Borland SQL Links README file
(READLINK.TXT)and the IDAPI Configuration Utility online Help.
Terms and conventions
The Borland SQL Links manuals use special typefaces to help you distinguish between
keys to press, names of objects, menu commands, and text to be entered. The following
table lists these conventions:
Table Intro.2 SQL Link documentation conventions
Convention
Applies to
Examples
Bold type
Method names, error and information
messages, and text the user types in
insertRecord
Paradox displays the message Index
error on key field
Enter a:\install
Italic type
Glossary terms, variables, emphasized
words
Answer table, searchButton, searchVal
ALL CAPS
DOS files and directories, reserved
words, operators, types of SQL queries
CONNECT.EXE, C:\WINDOWS,
CREATE
Initial Caps
Applications, fields, menu commands,
data types
Sample application, Price field,
Form | View Data command,
Interval data type
Keycap Font
Keys on the computer keyboard
F1, Enter
Monospaced font
Code examples
myTable.open(“sites.db”)
Introduction 3
121279796.001.png
4 SQL Links User’s Guide
121279796.002.png
1
Chapter 1
How Borland SQL Links work
This chapter provides a general overview of the Borland SQL Links and how they work
with a Borland Database Engine (BDE) application.
Introduction
If you work in a setting where you need to share access to files or printers, you are
probably familiar with the idea of a local area network , or LAN. A LAN enables
workstation users to share files, software, and printer resources stored on dedicated
machines called servers . Workstations connect to network servers through a system of
cabling, communications hardware, and software. In large user populations, two or
more LANs can connect through gateways to form wide area networks , or WANs.
In a network environment, your workstation uses the network server in much the same
way as it uses its own hard disk. If your workstation needs access to data stored on the
server’s hard disk it requests that data from the server. The server sends the requested
data over the network and back to your workstation where it is processed locally.
However, the network server differs from the workstation in that server data can be
accessed by more than one user at the same time.
The database server
A database server is a computer that processes high-level database requests. Although
other types of network servers let most processing occur on the user’s workstation,
database servers are active, with most processing occurring on the database server itself.
If your workstation needs access to data stored in a database server, you query the server
directly. The database server processes the query itself and sends only the answer over
the network and back to your workstation.
Since the processing is performed at the server and not at the workstation that
originated the request, the workstation becomes a client of the database server. In a
client/server system , multiple clients (users) request the services of the database server
Chapter 1, How Borland SQL Links work 5
Chapter
121279796.003.png
Zgłoś jeśli naruszono regulamin