Jill,

The "QueryMode Save/Load" will save/load the query parameters that you type
in - not the rows from the retrieve.

In other words, Jill, you had the correct understanding in the first place
- "save the query parameters so that you could load and run the query again
in the future".

Also, to do a "Load", you do not have to already be in QueryMode, it will
do that for you.  In other words, when you call of_load(), it checks to see
if you are in QueryMode, and if you are not, it calls "of_SetEnabled(true)"
for you.

Lastly, to reiterate for clarification, before you can "Save" a query,
QueryMode must first be enabled (i.e. your user must be in QueryMode to
"Save" a query).

Have fun,
~Sharon
--
Sharon Weinstrom Buntz      | mailto:[EMAIL PROTECTED]
Cheat Sheet for PFC/PB Help | http://www.pfccheatsheet.com/



"Jill M. Claus" wrote:
> 
> I guess I misunderstood what it was that the load and save functions actually did.  
>I had thought that it would save the query parameters so that you could load and run 
>the query again in the future.  But from your message, I gather that it is the 
>results of the query that it saves and loads?  (Not that actual query itself.)  Is 
>that correct?
> 
> Jill Claus   (842-4369)
> Financial Information Management
> 
> >>> "Price, Duncan" <[EMAIL PROTECTED]> 09/27/99 05:44PM >>>
> What is saved is just the dw_1.Describe ( "datawindow.data" ) - i.e. the
> rows. The actual query is not saved. So it will look just like you
> mentioned.
> 
> To load it back in the datawindow must be in QueryMode.
> Try dw_1.inv_QueryMode.of_SetEnabled( TRUE ) before you load.
> 
> You may even need this before the save. The datawindow must be in QueryMode
> to accept the criteria, then must be outside of QueryMode to retrieve ( if I
> remember right - it's been a long time !!). If you wish tio have the
> complete QUERY that it has constructed then after it has been taken out of
> querymode you will be able to Describe the datawindow to get it.
> "Datawindow.Table.Select" (or SQLSelect ) ....
> 
> > -----Original Message-----
> > From: Jill M. Claus [SMTP:[EMAIL PROTECTED]]
> > Sent: Monday, September 27, 1999 9:57 PM
> > To:   [EMAIL PROTECTED]
> > Subject:      PFCSIG:  n_cst_dwsrv_querymode
> >
> > Thank you for your response.  Your suggestion did make the null error go
> > away and the file open/save dialogue boxes do open now when I click on the
> > appropriate command buttons.  I don't get any error messages any more, but
> > the of_save doesn't appear to do what I would have expected.  If I put
> > "7/31/99" under the field called date, then the save dialogue box simply
> > saves the "7/31/99" into a text file.  Then the load button doesn't appear
> > to do anything at all.   Do you know what the file the of_save function
> > creates it saves should look like if opened with something like notepad?
> >
> > Jill Claus   (842-4369)
> > Financial Information Management
> >
> >
> > >>> "Price, Duncan" <[EMAIL PROTECTED]> 09/27/99 03:33PM >>>
> > It can only be complaining that the service has not been instanciated
> > Did you try  dw1.of_SetQueryMode( TRUE )  in the constructor of dw1 ???
> >
> > > -----Original Message-----
> > > From:       Jill M. Claus [SMTP:[EMAIL PROTECTED]]
> > > Sent:       Monday, September 27, 1999 7:47 PM
> > > To: [EMAIL PROTECTED]
> > > Subject:    PFCSIG:  n_cst_dwsrv_querymode
> > >
> > > I am using Powerbuilder 6.5 and Sybase 11 on NT.
> > >
> > > I created a window that uses the n_cst_dwsrv_querymode service and it
> > > works well.  However, I want to add the functionality to it that will
> > > allow users to save and load the queries they create.
> > >
> > > Online help provides the following example:
> > >
> > > FOR SAVE:  ( I put this in a cb_save command button on the window)
> > > String    ls_path_name, ls_doc_name
> > > ls_path_name = "c:\temp\rkn.txt"
> > > dw_1.inv_querymode.of_Save ("Save a Query", ls_path_name, ls_doc_name)
> > >
> > > FOR LOAD:  ( I put this in a cb_load command button on the window)
> > > Integer   li_return
> > > String    ls_path_name, ls_doc_name
> > > ls_path_name = "c:\temp\rkn.txt"
> > > dw_1.inv_querymode.of_Load ("Load a Query", ls_path_name, ls_doc_name)
> > >
> > > But when I put the above in the onclick for the two respective command
> > > buttons, I get a null object reference error in both cases.
> > >
> > > Does anyone know how this should be done?
> > >
> > > Any help would be greatly appreciated,
> > > Jill Claus
> > >
> > > Jill Claus   (842-4369)
> > > Financial Information Management
> [EMAIL PROTECTED] HOSTED BY IIGG, INC. FOR HELP WITH LIST SERVE COMMANDS, ADDRESS
> A MESSAGE TO [EMAIL PROTECTED] WITH THE FOLLOWING MESSAGE:   help pfcsig
> SEND ALL OTHER INQUIRES TO [EMAIL PROTECTED]

Reply via email to