Jill,
This may seem elementary, but sometimes that's the hardest to see...
1) Did you change "dw_1" to your appropriate target DW control name?
2) Did you code of_SetQuerymode(TRUE) for your target DW control?
3) Before you can "Save" a query, QueryMode must first be enabled (i.e.
your user must be in QueryMode to "Save" a query. So we normally
disable/enable our command button appropriately.
When does your null object reference error occur? Do you ever see the
system Open File dialog window appear (the one that will get the user's
filename selection)? Any other code in the button?
Any other suggestions?
Good luck - Let us know what it is when you figure it out.
Have fun,
~Sharon
--
Sharon Weinstrom Buntz | mailto:[EMAIL PROTECTED]
Cheat Sheet for PFC/PB Help | http://www.pfccheatsheet.com/
"Jill M. Claus" wrote:
>
> 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]