SetDWObject method (DataWindows)
Description
Specifies the DataWindow library and object that the Web DataWindow server
component will use for generating HTML.
SetDWObjectEx
A separate method name is provided as an alternative syntax
for specifying DataWindow objects in a PBD generated by the Web DataWindow
Component project wizard. Because it is already included in its
own library list property, the PBD component does not take an argument
for a source file name. The generated PBD also includes a reference
to the DataWindow HTML generator that it implements as an interface.
Controls
|
DataWindow type |
Method applies to |
|---|---|
|
Web |
Server component |
Syntax
[Web DataWindow server component]
|
1 |
int <span>dwcomponent</span>.<span>SetDWObject</span> ( string <span>sourcefile</span>, <br>       string <span>dwobjectname</span> )<br>int <span>dwcomponent</span>.<span>SetDWObjectEx</span> ( string <span>dwobjectname</span> ) |
|
Argument |
Description |
|---|---|
|
dwcomponent |
A reference to a Web DataWindow server |
|
sourcefile |
The name of a PowerBuilder library (PBL) or dynamic library (PBD) containing or A source definition file (SRD) or A Powersoft report (PSR) containing a DataWindow object definition The file must be located in the file system of the machine hosting |
|
dwobjectname |
When sourcefile is When sourcefile is a PSR or SRD, dwobjectname should |
Return Values
Returns 1 if it succeeds and –1 if an error occurs.
Usage
For information about using the Web DataWindow, see the DataWindow Programmers
Guide.
Examples
This example identifies the library and DataWindow
object for the server component called dwGen:
|
1 |
int retVal = dwGen.<span>SetDWObject</span>("htgenex.pbl", |
|
1 |
"d_tabular_dept") |