Syntax 2For the Web DataWindow server component
Description
Specifies connection information for the Web DataWindow, such
as the database name.
Controls
DataWindow type |
Method applies to |
---|---|
Web |
Server component |
Syntax
[Web DataWindow server component]
1 |
integer <span>dwcontrol</span>.<span>SetTrans</span> ( string <span>dbms</span>, string <span>dbparm</span>, string <span>lock</span>,<br>string <span>logid</span>, string <span>logpass</span>, string <span>database</span>, string <span>servername</span> ) |
Argument |
Description |
||
---|---|---|---|
dwcontrol |
A reference to a DataWindow control, |
||
dbms |
PowerBuilder vendor identifier. |
||
dbparm |
DBMS-specific parameters. For example,
|
||
lock |
The isolation level. For information |
||
logid |
The name or ID to be used to log on to |
||
logpass |
The password to be used to log on to |
||
database |
The name of the database to which you |
||
servername |
The name of the server where the database |
Return Values
Returns 1 if it succeeds and –1 if an error occurs.
Usage
When the server component is installed in EAServer, you must use EAServer
Manager to set up a connection cache for the component.
You use SetTrans when you want the DataWindow
engine to manage database connections, transaction state primitives,
and related EAServer component
deactivation. This is incompatible with the UseContextObject database
parameter, which you set only to retain control of connection and transaction
functions yourself.
Because the default Web DataWindow component uses SetTrans to specify
database connection information, you must not set the UseContextObject
database parameter to Yes in your database
profile or in the EAServer properties
for the component.
Examples
This statement specifies ODBC connection information
for the server component called webDW:
1 |
webDW.<span>SetTrans</span>("ODBC", <br>"ConnectString='DSN=EAS Demo DB V10; UID=dba;PWD=sql'", "", "", "", "", ""); |
This statement specifies JDBC connection information:
1 |
webDW.<span>SetTrans</span>("JDS", "Driver='com.sybase.jdbc3.jdbc.SybDriver',<br>URL='jdbc:sybase:Tds:localhost:7373'", <br>"", "dba", "sql", "", ""); |