Setting up database connections
When you use the Web DataWindow, 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.
What database connectivity software to use
If you are using EAServer as the component server, you can
use several types of connectivity software, including ODBC, Open
Client, JDBC, and OCI. You need to set up a connection cache for
the data source you are using. See “Creating a connection cache
on EAServer “.
If you are using MTS as the component server, you must use
ODBC to take advantage of connection pooling and transaction management
features. The data source for your DataWindow objects must be configured
as a system DSN on MTS or IIS because both run as services.
When you are defining DataWindow objects in PowerBuilder or
DataWindow Builder, you can use the types of connectivity software
documented in Connecting to Your Database
.
To simplify setting up database connections on the server, use the
same type of connection in the DataWindow painter that will be used
when the DataWindow is deployed. For example, if you plan to use
the DataWindow object in EAServer with an Open Client connection,
use Open Client in the DataWindow painter too.
Using Adaptive Server Enterprise PowerBuilder and EAServer use slightly different versions
of the CT-Lib software to connect to Adaptive Server Enterprise
via Open Client. In the PowerBuilder development environment you
use the SYC native database interface to connect to the database,
but to connect to an Adaptive Server Enterprise database in EAServer you
must use the SYJ database interface.
Creating a connection cache
on EAServer
To use the HTMLGenerator90 component (or your own custom component)
in EAServer, you need to define a connection cache for the database
it will use.
To create an EAServer connection cache:
-
Start EAServer and the Jaguar Manager.
Follow the instructions in the EAServer Getting
Started
book for your platform. -
Define the connection type you want, using the
appropriate database configuration software.For an ODBC connection on Windows, for example, open the ODBC control
panel and define a Data Source Name (DSN) for the database. If you
installed Adaptive Server Anywhere 8.x, you can use the predefined user
DSN to connect to the ASA Sample database for testing purposes.
If EAServer is running as a service, you must use a system DSN,
not a user DSN. On UNIX, see your driver documentation. -
In Jaguar Manager’s left pane, right-click
the Connection Caches node under the server name and select Install
Connection Cache. -
In the dialog box, select Create and Install a
New Connection Cache. -
Enter a name for the cache and click OK. (You
cannot change the name later.) -
In the Connection Cache Properties dialog box,
specify database connection information on the General tab and the
driver you want to use on the Driver tab.For ODBC on Windows
: for Database Connection:Server
Name on the General tab, specify the DSN you defined in step 1.
You do not need to specify a user name or password if they are specified
as part of the DSN.On the Driver tab, click the ODBC radio button and specify
ODBC32.dll for the Driver Class or File.For other connection types
: see the EAServer Getting
Started
book for your platform. -
Select the Enable Cache-by-Name Access checkbox
on the Cache tab. -
Click Refresh on the General tab (the Refresh
button is available only on the Connection Cache Properties dialog
box accessed from the server node). - To test the connection, click Ping.
For more detailed information about setting up connection
caches, see the EAServer documentation.