没有合适的资源?快使用搜索试试~ 我知道了~
[ebook] Java - Borland JBuilder - Developing Database Applicatio...
需积分: 10 49 下载量 137 浏览量
2007-04-13
07:38:43
上传
评论
收藏 8.05MB PDF 举报
温馨提示
试读
272页
大学4年收集了不少好的电子书,这些都是经典中的经典,没什么好说的,快下载吧。<br/>我的资源,你们可以转载。对于书籍,其版权归原书作者。<br/>源代码,你们可以修改完善,二次开发。<br/>提升你的职业技术水平<br/>为我国计算机事业做出更多的贡献。
资源推荐
资源详情
资源评论
Developing database
applications
VERSION 3
Borland, A Division of Inprise Corporation
100 Enterprise Way, Scotts Valley, CA 95066-3249
Borland
®
JBuilder
™
for Windows 95, Windows 98, & Windows NT
Refer to the file DEPLOY.TXT located in the root directory of your JBuilder 3 product for a complete list of files that
you can distribute in accordance with the JBuilder 3 License Statement and Limited Warranty.
Inprise may have patents and/or pending patent applications covering subject matter in this document. The
furnishing of this document does not give you any license to these patents.
C
OPYRIGHT © 1999 Inprise Corporation. All rights reserved. Borland is a division of Inprise Corporation. All Inprise
and Borland products are trademarks or registered trademarks of Inprise Corporation. Other brand and product
names are trademarks or registered trademarks of their respective holders.
Printed in the U.S.A.
JBE1330WW21001 2E1R399
9900010203-9 8 7654321
PDF
i
Chapter 1
Developing database applications 1-1
Chapter 2
Installing and setting up JBuilder for
database applications 2-1
Installing JBuilder, JDBC, and the
JDBC-ODBC bridge . . . . . . . . . . . . . . . 2-1
Installing JDBC and the JDBC-ODBC
bridge . . . . . . . . . . . . . . . . . . . . . 2-2
Connecting to databases. . . . . . . . . . . . 2-2
Installing JBuilder sample files . . . . . . . . . 2-3
Installing Local InterBase Server . . . . . . . . . 2-3
Starting the InterBase Server . . . . . . . . . 2-5
Stopping the InterBase Server . . . . . . . . 2-5
Tips on using InterBase . . . . . . . . . . . . 2-5
Using InterClient. . . . . . . . . . . . . . . . . . 2-6
Troubleshooting JDBC database
connections in the tutorials . . . . . . . . . . . 2-8
Unable to load dll ‘JdbcOdbc.dll’ . . . . . 2-8
java.sql.SQLException: No suitable
driver . . . . . . . . . . . . . . . . . . . 2-8
Data source name not found . . . . . . . 2-8
Connection failed
java.sql.SQLException: [...]
unavailable database . . . . . . . . . . . 2-9
Chapter 3
Understanding JBuilder
database applications 3-1
Understanding JBuilder’s DataExpress
architecture . . . . . . . . . . . . . . . . . . . . 3-3
borland.com database-related packages . . . . 3-5
Chapter 4
Connecting to a database 4-1
Tutorial: Connecting to a database using
the JDBC-ODBC bridge . . . . . . . . . . . . . 4-3
Adding a Database component to your
application . . . . . . . . . . . . . . . . . . 4-3
Setting Database connection properties . . . 4-4
Using the Database component in your
application . . . . . . . . . . . . . . . . . . . 4-6
Tutorial: Connecting to a database using an
all-Java JDBC driver . . . . . . . . . . . . . . . 4-6
Setting up InterClient for database
tutorials . . . . . . . . . . . . . . . . . . . . 4-6
Using InterClient all-Java JDBC drivers
in JBuilder . . . . . . . . . . . . . . . . . . . 4-7
Chapter 5
Accessing data 5-1
An introductory database tutorial using
a text file . . . . . . . . . . . . . . . . . . . . . . 5-3
Creating the application structure . . . . . . . 5-4
Adding UI components to your
application . . . . . . . . . . . . . . . . . . . 5-6
Adding a UI component . . . . . . . . . . 5-6
Adding DataExpress components to
your application . . . . . . . . . . . . . . . . 5-9
Setting properties to connect the
components . . . . . . . . . . . . . . . . . . 5-9
Setting properties of DataExpress
components. . . . . . . . . . . . . . . . 5-10
Setting properties of UI components . . 5-11
Compiling, running, and debugging a
program . . . . . . . . . . . . . . . . . . . 5-12
Summary . . . . . . . . . . . . . . . . . . . . 5-13
Querying a database . . . . . . . . . . . . . . . 5-13
Tutorial: Querying a database using the
JBuilder UI . . . . . . . . . . . . . . . . . . 5-14
Populating a data set . . . . . . . . . . . 5-15
Creating the UI. . . . . . . . . . . . . . . 5-16
Enhancing data set performance. . . . . . . 5-17
Persisting metadata of a query . . . . . . . 5-18
Opening and closing data sets . . . . . . . 5-19
Ensuring that a query is updateable. . . . . 5-19
Setting properties in the query dialog. . . . 5-19
The Query page . . . . . . . . . . . . . . 5-20
The Parameters page . . . . . . . . . . . 5-21
Place SQL text in resource bundle . . . . 5-22
Using parameterized queries to obtain
data from your database . . . . . . . . . . . . 5-23
Tutorial: Parameterizing a query . . . . . . 5-24
Contents
ii
Using parameters. . . . . . . . . . . . . . . .5-27
Re-executing the parameterized query
with new parameters . . . . . . . . . . . .5-29
Binding parameters . . . . . . . . . . . . . .5-29
Parameterized queries in master-detail
relationships. . . . . . . . . . . . . . . . . .5-30
Obtaining data through a stored procedure . .5-30
Tutorial: Accessing data through a
stored procedure . . . . . . . . . . . . . . .5-31
Creating tables and procedures for
the tutorial . . . . . . . . . . . . . . . . .5-32
Adding the DataSet components . . . . .5-32
Adding visual controls . . . . . . . . . . .5-33
Discussion of stored procedure escape
sequences, SQL statements, and
server-specific procedure calls . . . . . . .5-34
Creating tables and procedures for
the tutorial manually. . . . . . . . . . . . .5-34
Example: Using InterBase stored
procedures . . . . . . . . . . . . . . . . . .5-36
Example: Using parameters with
Oracle PL/SQL stored procedures . . . . .5-37
Using Sybase stored procedures . . . . . . .5-38
Browsing sample applications that
use stored procedures . . . . . . . . . . . .5-38
Writing a custom data provider . . . . . . . . .5-38
Obtaining metadata . . . . . . . . . . . . . .5-39
Invoking initData . . . . . . . . . . . . . .5-40
Obtaining actual data . . . . . . . . . . . . .5-40
Tips on designing a custom data
provider . . . . . . . . . . . . . . . . . .5-40
Understanding the provideData
method in master-detail data sets . . .5-41
Working with columns . . . . . . . . . . . . . .5-41
Column properties and metadata . . . . . .5-41
Metadata and how it is obtained . . . . .5-42
Non-metadata column properties. . . . .5-42
Viewing column information in the
Column Designer . . . . . . . . . . . . .5-42
Using the Column Designer to persist
metadata . . . . . . . . . . . . . . . . . .5-43
Making metadata dynamic using
the Column Designer . . . . . . . . . .5-44
Viewing column information in the
JDBC Explorer . . . . . . . . . . . . . . .5-44
Optimizing a query . . . . . . . . . . . . . . . .5-45
Setting column properties . . . . . . . . .5-45
Persistent columns . . . . . . . . . . . . .5-46
Combining live metadata with
persistent columns. . . . . . . . . . . . 5-47
Removing persistent columns . . . . . . 5-47
Controlling column order in a
DataSet . . . . . . . . . . . . . . . . . . 5-48
Chapter 6
Saving changes back to
your data source 6-1
Saving changes from a QueryDataSet . . . . . . 6-2
Saving changes back to your data source
with a stored procedure . . . . . . . . . . . . . 6-5
Tutorial: Saving changes with a
NavigatorControl . . . . . . . . . . . . . . . 6-5
Coding stored procedures to handle
data resolution . . . . . . . . . . . . . . . . . 6-7
Tutorial: Saving changes with a
ProcedureResolver. . . . . . . . . . . . . . . 6-8
Example: Using InterBase stored
procedures with return parameters . . . . 6-10
Resolving data from multiple tables . . . . . . 6-10
Considerations for the type of linkage
between tables in the query . . . . . . . . 6-11
Table and column references (aliases)
in a query string . . . . . . . . . . . . . . . 6-12
Controlling the setting of the column
properties. . . . . . . . . . . . . . . . . . . 6-12
What if a table is not updatable? . . . . . . 6-12
How can the user specify that a table
should never be updated? . . . . . . . . . 6-12
Streaming data . . . . . . . . . . . . . . . . . . 6-12
Example: Using streamable data sets . . . . 6-13
Using streamable DataSet methods . . . . . 6-13
Customizing the default resolver logic . . . . . 6-14
Understanding default resolving . . . . . . 6-15
Adding a QueryResolver component . . 6-15
Intercepting resolver events . . . . . . . 6-16
Tutorial: Using resolver events . . . . . . 6-17
Writing a custom data resolver . . . . . . . 6-18
Handling resolver errors . . . . . . . . . 6-18
Resolving master-detail relationships . . 6-19
Chapter 7
Establishing a master-detail
relationship 7-1
Defining a master-detail relationship. . . . . . . 7-2
iii
Fetching details. . . . . . . . . . . . . . . . . . . 7-2
Fetching all details at once . . . . . . . . . . 7-3
Fetching selected detail records on
demand . . . . . . . . . . . . . . . . . . . . 7-3
Editing data in master-detail data sets. . . . . . 7-4
Steps to creating a master-detail
relationship . . . . . . . . . . . . . . . . . . . . 7-4
Tutorial: Creating a master-detail
relationship . . . . . . . . . . . . . . . . . . . . 7-5
Saving changes in a master-detail
relationship . . . . . . . . . . . . . . . . . . . . 7-8
Resolving master-detail data sets to a
JDBC data source . . . . . . . . . . . . . . . 7-9
Chapter 8
Importing and exporting data
from a text file 8-1
Tutorial: Importing data from a text file. . . . . 8-1
Adding columns to a TableDataSet in the
editor . . . . . . . . . . . . . . . . . . . . . . . 8-3
Importing formatted data from a text file . . . . 8-4
Retrieving data from a JDBC data source . . . . 8-4
Exporting data . . . . . . . . . . . . . . . . . . . 8-5
Tutorial: Exporting data from a
TableDataSet to a text file . . . . . . . . . . 8-5
Tutorial: Using patterns for exporting
numeric, date/time, and text fields. . . . . 8-7
Exporting data from a QueryDataSet
to a text file . . . . . . . . . . . . . . . . . . 8-9
Saving changes from a TableDataSet
to a SQL table . . . . . . . . . . . . . . . . . 8-9
Saving changes loaded from a
TextDataFile to a JDBC data source. . . . . 8-9
Chapter 9
Using data modules to simplify
data access 9-1
Creating a data module using the
designer tools . . . . . . . . . . . . . . . . . . 9-2
Adding data components to the data
module . . . . . . . . . . . . . . . . . . . . 9-2
Adding business logic to the data module . 9-4
Using a data module . . . . . . . . . . . . . . . 9-4
Understanding the Use Data Module
dialog box . . . . . . . . . . . . . . . . . . . 9-5
Using the Data Modeler to create a data
module . . . . . . . . . . . . . . . . . . . . . . . 9-6
Opening a data module in the
Data Modeler . . . . . . . . . . . . . . . . . 9-8
Chapter 10
Persisting and storing data
in a DataStore 10-1
When to use a DataStore . . . . . . . . . . . . . 10-1
Using the DataStore Explorer . . . . . . . . . . 10-2
DataStore operations . . . . . . . . . . . . . . . 10-2
Chapter 11
Filtering, sorting, and locating data 11-1
Providing data. . . . . . . . . . . . . . . . . . . 11-2
Filtering data . . . . . . . . . . . . . . . . . . . 11-4
Tutorial: Adding and removing filters . . . 11-5
Example: Filtering with a restrictive
clause in a query . . . . . . . . . . . . . . . 11-7
Sorting data . . . . . . . . . . . . . . . . . . . . 11-7
Sorting data in a GridControl . . . . . . . . 11-8
Sorting data using the JBuilder visual
design tools. . . . . . . . . . . . . . . . . . 11-8
Sorting and indexing . . . . . . . . . . . . . 11-9
Sorting data in code . . . . . . . . . . . . .11-11
Locating data . . . . . . . . . . . . . . . . . . .11-11
Locating data with the LocatorControl . . .11-11
Locating data programmatically . . . . . .11-14
Locating data using a DataRow . . . . . . .11-15
Working with locate options . . . . . . . . .11-15
Locates that handle any data type . . . . .11-16
Column order in the DataRow and
DataSet . . . . . . . . . . . . . . . . . . . .11-16
Chapter 12
Adding functionality to
database applications 12-1
Presenting an alternate view of the data . . . . 12-2
Adding an Edit or Display Pattern for data
formatting . . . . . . . . . . . . . . . . . . . . 12-3
Display masks . . . . . . . . . . . . . . . . . 12-5
Edit masks . . . . . . . . . . . . . . . . . . . 12-5
Using masks for importing and
exporting data . . . . . . . . . . . . . . . . 12-5
剩余271页未读,继续阅读
资源评论
luozhuang
- 粉丝: 4451
- 资源: 225
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功