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 - Specified criterion is invalid

3 posts in DataWindow Last posting was on 2008-05-28 06:08:01.0Z
DARKinVADER Posted on 2008-05-27 09:48:55.0Z
From: DARKinVADER <gabor.czibik@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: QueryMode - Specified criterion is invalid
Date: Tue, 27 May 2008 02:48:55 -0700 (PDT)
Organization: http://groups.google.com
Lines: 52
Message-ID: <889bb9d1-7241-4b45-9277-d268539ffe78@e53g2000hsa.googlegroups.com>
NNTP-Posting-Host: 213.253.200.123
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1211881736 19665 127.0.0.1 (27 May 2008 09:48:56 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 27 May 2008 09:48:56 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: e53g2000hsa.googlegroups.com; posting-host=213.253.200.123; posting-account=dhPQWQoAAAASdeDvzZ3tG_O1zpfamNkB
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008051206 Firefox/3.0,gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!newsfeed.yul.equant.net!nntp1.roc.gblx.net!nntp.gblx.net!nntp.gblx.net!nlpi057.nbdc.sbc.com!prodigy.net!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!e53g2000hsa.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:86963
Article PK: 416220

Hi All!

We have been migrated our PowerBuilder version from 9 to PB 11.2 and
we have a strange problem (maybe a PB bug?).
We are using DataWindows with QueryMode in order to let the user
specify the query criteria, and we are using the following sign as the
joker character:

°

After the user push the search button we manually change the ° signs
to % and modify the where clause. In PB9 everything worked fine, but
after we shifted to PB11 we get an error.
The error occurs, when we use this character is at the beginning of
the filter criteria. For example, I want to filter names (ending with
"Tom"), and if I write to the datawindow this:

°Tom

it causes this Specified criterion is invalid.

If I write Tom° it's okay.

The datawindow field is a normal text field, it has nothing special
Edit/Format style etc.
The error occurs when we call Accepttext, or the field looses the
focus, and the ItemError event is triggered. I tried this code in the
ItemError event:

string ls_tmp
// override
ls_tmp = data
if( Pos(ls_tmp, '°') = 1 )then
return 2 // to accept the data
end if

return 0

To accept the text. The problem with this was, that after the
Accepttext call

ll_ret = dw_query.AcceptText()
ls_sql = dw_query.GetSQLSelect()

The filter criteria was not generated properly. All the valid filter
criteria is generated in the sql, except the one's beginning with °

The interesting is that it all worked with PB9. What has changed, how
can we fix it? Every help would be appreciated!

Have a nice day!


M. Searer Posted on 2008-05-27 17:57:54.0Z
From: "M. Searer" <nospam@nospam.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <889bb9d1-7241-4b45-9277-d268539ffe78@e53g2000hsa.googlegroups.com>
Subject: Re: QueryMode - Specified criterion is invalid
Lines: 62
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <483c4ba2$1@forums-1-dub>
Date: 27 May 2008 10:57:54 -0700
X-Trace: forums-1-dub 1211911074 10.22.241.152 (27 May 2008 10:57:54 -0700)
X-Original-Trace: 27 May 2008 10:57:54 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:86970
Article PK: 416226

unicode is the major change.
I would bet that your special wildcard character is not what it was.
If you are using chr or ASC it may return a different value.




"DARKinVADER" <gabor.czibik@gmail.com> wrote in message
news:889bb9d1-7241-4b45-9277-d268539ffe78@e53g2000hsa.googlegroups.com...
Hi All!

We have been migrated our PowerBuilder version from 9 to PB 11.2 and
we have a strange problem (maybe a PB bug?).
We are using DataWindows with QueryMode in order to let the user
specify the query criteria, and we are using the following sign as the
joker character:

°

After the user push the search button we manually change the ° signs
to % and modify the where clause. In PB9 everything worked fine, but
after we shifted to PB11 we get an error.
The error occurs, when we use this character is at the beginning of
the filter criteria. For example, I want to filter names (ending with
"Tom"), and if I write to the datawindow this:

°Tom

it causes this Specified criterion is invalid.

If I write Tom° it's okay.

The datawindow field is a normal text field, it has nothing special
Edit/Format style etc.
The error occurs when we call Accepttext, or the field looses the
focus, and the ItemError event is triggered. I tried this code in the
ItemError event:

string ls_tmp
// override
ls_tmp = data
if( Pos(ls_tmp, '°') = 1 )then
return 2 // to accept the data
end if

return 0

To accept the text. The problem with this was, that after the
Accepttext call

ll_ret = dw_query.AcceptText()
ls_sql = dw_query.GetSQLSelect()

The filter criteria was not generated properly. All the valid filter
criteria is generated in the sql, except the one's beginning with °

The interesting is that it all worked with PB9. What has changed, how
can we fix it? Every help would be appreciated!

Have a nice day!


DARKinVADER Posted on 2008-05-28 06:08:01.0Z
From: DARKinVADER <gabor.czibik@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: QueryMode - Specified criterion is invalid
Date: Tue, 27 May 2008 23:08:01 -0700 (PDT)
Organization: http://groups.google.com
Lines: 62
Message-ID: <d9af5723-378b-4999-8933-051ec2dd8c63@k37g2000hsf.googlegroups.com>
References: <889bb9d1-7241-4b45-9277-d268539ffe78@e53g2000hsa.googlegroups.com> <483c4ba2$1@forums-1-dub>
NNTP-Posting-Host: 213.253.200.123
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1211954881 29184 127.0.0.1 (28 May 2008 06:08:01 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Wed, 28 May 2008 06:08:01 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: k37g2000hsf.googlegroups.com; posting-host=213.253.200.123; posting-account=dhPQWQoAAAASdeDvzZ3tG_O1zpfamNkB
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008051206 Firefox/3.0,gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!newsfeed.gamma.ru!Gamma.RU!postnews.google.com!k37g2000hsf.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:86974
Article PK: 416231


On máj. 27, 19:57, "M. Searer" <nos...@nospam.com> wrote:
> unicode is the major change.
> I would bet that your special wildcard character is not what it was.
> If you are using chr or ASC it may return a different value.
>
> "DARKinVADER" <gabor.czi...@gmail.com> wrote in message
>
> news:889bb9d1-7241-4b45-9277-d268539ffe78@e53g2000hsa.googlegroups.com...
> Hi All!
>
> We have been migrated our PowerBuilder version from 9 to PB 11.2 and
> we have a strange problem (maybe a PB bug?).
> We are using DataWindows with QueryMode in order to let the user
> specify the query criteria, and we are using the following sign as the
> joker character:
>
> °
>
> After the user push the search button we manually change the ° signs
> to % and modify the where clause. In PB9 everything worked fine, but
> after we shifted to PB11 we get an error.
> The error occurs, when we use this character is at the beginning of
> the filter criteria. For example, I want to filter names (ending with
> "Tom"), and if I write to the datawindow this:
>
> °Tom
>
> it causes this Specified criterion is invalid.
>
> If I write Tom° it's okay.
>
> The datawindow field is a normal text field, it has nothing special
> Edit/Format style etc.
> The error occurs when we call Accepttext, or the field looses the
> focus, and the ItemError event is triggered. I tried this code in the
> ItemError event:
>
> string ls_tmp
> // override
> ls_tmp = data
> if( Pos(ls_tmp, '°') = 1 )then
> return 2 // to accept the data
> end if
>
> return 0
>
> To accept the text. The problem with this was, that  after the
> Accepttext call
>
> ll_ret = dw_query.AcceptText()
> ls_sql = dw_query.GetSQLSelect()
>
> The filter criteria was not generated properly. All the valid filter
> criteria is generated in the sql, except the one's beginning with °
>
> The interesting is that it all worked with PB9. What has changed, how
> can we fix it? Every help would be appreciated!
>
> Have a nice day!

I don't know exactly what you mean, but we are not using any of that
ASC or CHR function.