Accessing database content from your Web target – PB Docs 90

Accessing database content from your Web target

If you want to
access database content from your Web application, you should define
a database profile to make this connection available throughout
your Web target. A database
profile is a named set of parameters stored in the registry that
defines a connection to a particular database.

Defining database profiles

To define a database connection profile, select the DB Profiles
button from the PowerBar. Use the Database Profiles dialog box and
the interface-specific Database Profile Setup dialog box to define
your profile. The database profile specifies the parameters for
connecting to the database, including a user ID and password, a
server name, a database name, and other optional information.

For more information about defining database profiles, see Connecting
to Your Database

.

Using database profiles in a DTC

After
you set up database access for a Web target, you can add a Web DataWindow
DTC to your page or write scripts that otherwise reference a database
profile. In the Properties dialog box for the Web DataWindow DTC, you
select both the DataWindow object you want to use and the database connection
profile used by that DataWindow.

For more information, see “Selecting a database profile”.

Using database profiles in a script

If you
choose not to use the DTC and instead create a database connection
from a script, you can add logic to the connection definition that
gets executed during page processing by an application server.

For information on writing scripts to access a database, see
the DataWindow Programmer’s Guide
.

Setting up database connections on a component
server

When you use the Web DataWindow (with or without the DTC),
it is the Web DataWindow server component that interacts with the
database, so you need to set up database connections on the server
where the component is running.

To make sure you have the same results at design time and
runtime, it is preferable to select the same database connection
type in the DataWindow painter (when you create a DataWindow object)
that you plan on using on the server where the DataWindow is deployed
(and that you select from a database connection drop-down list if
you are using the Web DataWindow DTC).

For more information on the database connectivity software
available on EAServer and MTS, see Connecting to Your
Database

and the DataWindow Programmer’s
Guide

.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x