- Tracy Lamb
- PowerBuilder
- Tuesday, 5 April 2022 10:57 PM UTC
Hi all,
I'm doing a very simple query window. I can put the dw in query mode, but when I retrieve, my query parameters are ignored and nothing is returned.
Here's the code for the dw:
//Constructor
this.of_SetUpdateable( FALSE )
// First, enable the DW services...
this.of_SetRowSelect( TRUE ) // Row selection service
this.of_SetSort(TRUE) // Sort service
this.of_SetFilter( True ) // Filter Service
this.of_SetQueryMode( TRUE ) // Query Mode service
// Second, set the transaction objects...
this.of_SetTransObject(SQLCA)
// Third, Initialize the DW services
this.inv_rowselect.of_SetStyle( 0 )
this.inv_sort.of_SetColumnNameSource(0) // Use the column names for sorting
this.inv_Sort.of_SetColumnHeader( TRUE ) // Sort when user clicks column header
this.inv_Sort.of_SetStyle( 0 ) // PB's Drag/Drop Sort window
this.inv_Filter.of_SetStyle( 0 ) // PB's Filter window
Here's the code for the window open event:
string ls_querycols[]
ls_querycols[1] = "tmde_noun"
ls_querycols[2] = "tmde_model"
ls_querycols[3] = "tmde_mfr"
dw_1.inv_querymode.of_SetQueryCols( ls_querycols )
// Open in query mode
dw_1.inv_querymode.of_SetEnabled( TRUE )
Here's the code for the Retrieve button:
dw_1.inv_querymode.of_SetEnabled( FALSE )
And the code for the Query button:
dw_1.inv_querymode.of_SetEnabled( TRUE )
Seems pretty simple, but apparently I'm missing something. Any advice is sincerely appreciated.
~~~Tracy
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.