Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

querymode clear query criteria and then reset it

3 posts in DataWindow Last posting was on 2009-01-29 18:31:43.0Z
cln Posted on 2009-01-28 21:58:33.0Z
Sender: 24c8.497fa0e3.1804289383@sybase.com
From: cln
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: querymode clear query criteria and then reset it
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4980d509.56a1.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 28 Jan 2009 13:58:33 -0800
X-Trace: forums-1-dub 1233179913 10.22.241.41 (28 Jan 2009 13:58:33 -0800)
X-Original-Trace: 28 Jan 2009 13:58:33 -0800, 10.22.241.41
Lines: 26
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88687
Article PK: 417945

Hi,
I was wondering if there is a way to set a query criteria
back to what it was before a clearquery is issued? Ideally
I would like to get the query criteria, store it in a
variable, clear the query criteria and then set the query
criteria back to what it was for certain cases I have. Is
this possible?

Basically I'm adjusting some sql that the querymode
generates. So I grab the dw describe sql and then change
the sql generated from the querymode criteria as necessary
and then modify the dw with the new change. When you do
that, modify adds the query criteria on to the sql again, so
what you really end up with is the modified sql and the
query criteria reapplied again in it's original state. So
to account for this, I clear the query criteria after I've
changed it but before I modify the dw with the changes.
That way only my modified sql is applied to the dw.

It works perfectly. The issue is then that if the user hits
query again, I'd like to set the query criteria on the
datawindow to display what they entered again (just like it
would if I hadn't cleared the query criteria). So I need to
have it stored and to set it back in this case.

cln


Chris Pollach Posted on 2009-01-29 12:33:46.0Z
From: "Chris Pollach" <cpollach@travel-net.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <4980d509.56a1.1681692777@sybase.com>
Subject: Re: querymode clear query criteria and then reset it
Lines: 49
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4981a22a$1@forums-1-dub>
Date: 29 Jan 2009 04:33:46 -0800
X-Trace: forums-1-dub 1233232426 10.22.241.152 (29 Jan 2009 04:33:46 -0800)
X-Original-Trace: 29 Jan 2009 04:33:46 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88693
Article PK: 417947

Hi Cln;

I have done this before by saving the DWO's query status in another
DataStore. After I clear the DC's DWO to reset it and then reactive the
QueryMode processing - I then loop through the data entry that I saved in
the DataStore and reapply this to the DC. The key to making this work for
the DC in QueryMode is to reload the users entries via the SetText ( )
method (aka keyboard simulation). Then use the SetColumn to move focus to
the next column before issuing the next SetText ( ).

This works great for me.

HTH

--
Regards ... Chris
ISUG - NA RUG Director
http://chrispollach.pbdjmagazine.com

<cln> wrote in message news:4980d509.56a1.1681692777@sybase.com...
> Hi,
> I was wondering if there is a way to set a query criteria
> back to what it was before a clearquery is issued? Ideally
> I would like to get the query criteria, store it in a
> variable, clear the query criteria and then set the query
> criteria back to what it was for certain cases I have. Is
> this possible?
>
> Basically I'm adjusting some sql that the querymode
> generates. So I grab the dw describe sql and then change
> the sql generated from the querymode criteria as necessary
> and then modify the dw with the new change. When you do
> that, modify adds the query criteria on to the sql again, so
> what you really end up with is the modified sql and the
> query criteria reapplied again in it's original state. So
> to account for this, I clear the query criteria after I've
> changed it but before I modify the dw with the changes.
> That way only my modified sql is applied to the dw.
>
> It works perfectly. The issue is then that if the user hits
> query again, I'd like to set the query criteria on the
> datawindow to display what they entered again (just like it
> would if I hadn't cleared the query criteria). So I need to
> have it stored and to set it back in this case.
>
> cln


cln Posted on 2009-01-29 18:31:43.0Z
Sender: 24c8.497fa0e3.1804289383@sybase.com
From: cln
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: querymode clear query criteria and then reset it
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4981f60f.1dc.1681692777@sybase.com>
References: <4981a22a$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 29 Jan 2009 10:31:43 -0800
X-Trace: forums-1-dub 1233253903 10.22.241.41 (29 Jan 2009 10:31:43 -0800)
X-Original-Trace: 29 Jan 2009 10:31:43 -0800, 10.22.241.41
Lines: 54
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88700
Article PK: 417953

Chris,
Great idea - I'll give it a whirl. Thank you!

> Hi Cln;
>
> I have done this before by saving the DWO's query status
> in another DataStore. After I clear the DC's DWO to reset
> it and then reactive the QueryMode processing - I then
> loop through the data entry that I saved in the DataStore
> and reapply this to the DC. The key to making this work
> for the DC in QueryMode is to reload the users entries
> via the SetText ( ) method (aka keyboard simulation).
> Then use the SetColumn to move focus to the next column
> before issuing the next SetText ( ).
>
> This works great for me.
>
> HTH
>
> --
> Regards ... Chris
> ISUG - NA RUG Director
> http://chrispollach.pbdjmagazine.com
>
>
> <cln> wrote in message
> > news:4980d509.56a1.1681692777@sybase.com... Hi,
> > I was wondering if there is a way to set a query
> > criteria back to what it was before a clearquery is
> > issued? Ideally I would like to get the query criteria,
> > store it in a variable, clear the query criteria and
> > then set the query criteria back to what it was for
> > certain cases I have. Is this possible?
> >
> > Basically I'm adjusting some sql that the querymode
> > generates. So I grab the dw describe sql and then
> > change the sql generated from the querymode criteria as
> > necessary and then modify the dw with the new change.
> > When you do that, modify adds the query criteria on to
> > the sql again, so what you really end up with is the
> > modified sql and the query criteria reapplied again in
> > it's original state. So to account for this, I clear
> > the query criteria after I've changed it but before I
> > modify the dw with the changes. That way only my
> modified sql is applied to the dw. >
> > It works perfectly. The issue is then that if the user
> > hits query again, I'd like to set the query criteria on
> > the datawindow to display what they entered again (just
> > like it would if I hadn't cleared the query criteria).
> > So I need to have it stored and to set it back in this
> case. >
> > cln
>
>