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.

PB 11.5 DW computed field crash

14 posts in DataWindow Last posting was on 2008-12-10 21:37:16.0Z
Leo leorj79 at hotmail dot com Posted on 2008-12-01 20:33:37.0Z
Sender: 41a4.4934327e.1804289383@sybase.com
From: Leo leorj79 at hotmail dot com
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: PB 11.5 DW computed field crash
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <49344a21.4412.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 1 Dec 2008 12:33:37 -0800
X-Trace: forums-1-dub 1228163617 10.22.241.41 (1 Dec 2008 12:33:37 -0800)
X-Original-Trace: 1 Dec 2008 12:33:37 -0800, 10.22.241.41
Lines: 40
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88266
Article PK: 417521

I have migrated my application from PB 10.2.1 TO PB 11.5.

The application crashes when it attempts to read from a
computed field, namely

ld_mydecimal = dw.getitemdecimal(1, "mycomputedfield")

The error is a GetType mismatch error.

when debugging and skipping the line above, the
"mycomputedfield" is displayed as blank (null) in the GUI
and its datatype obtained via
Describe("mycomputedfield.ColType") is "?".

Here's the expression used in the computed field: (computing
compound interest)

if( itemnonbb >= 0, ((itemnonbb * ((1 + (inflationpct/100))
^ inflationyrs)) - itemnonbb), 0)

All of the fields used in the expression are type decimal.

There seems to be a problem with the exponentiation operator
followed by a field that is a decimal (but it worked like
this in PB 10.2.1).

My new expression looks like this:

if( itemnonbb >= 0, ((itemnonbb * ((1 + (inflationpct/100))
^ number(string(inflationyrs)))) - itemnonbb), 0)

It seems to work this way, now my question is what's the
difference between the 2 PB versions and the exponentiation
function?

Any insight and further information is welcome.

Thanks,

-Leo


M. Searer Posted on 2008-12-02 17:31:14.0Z
From: "M. Searer" <nospam@nospam.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <49344a21.4412.1681692777@sybase.com>
In-Reply-To: <49344a21.4412.1681692777@sybase.com>
Subject: Re: PB 11.5 DW computed field crash
Lines: 43
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Windows Mail 6.0.6001.18000
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18049
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <493570e2$1@forums-1-dub>
Date: 2 Dec 2008 09:31:14 -0800
X-Trace: forums-1-dub 1228239074 10.22.241.152 (2 Dec 2008 09:31:14 -0800)
X-Original-Trace: 2 Dec 2008 09:31:14 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88270
Article PK: 417527

does getitemnumber work?

"Leo leorj79 at hotmail dot com" wrote in message news:49344a21.4412.1681692777@sybase.com...
>I have migrated my application from PB 10.2.1 TO PB 11.5.
>
> The application crashes when it attempts to read from a
> computed field, namely
>
> ld_mydecimal = dw.getitemdecimal(1, "mycomputedfield")
>
> The error is a GetType mismatch error.
>
> when debugging and skipping the line above, the
> "mycomputedfield" is displayed as blank (null) in the GUI
> and its datatype obtained via
> Describe("mycomputedfield.ColType") is "?".
>
> Here's the expression used in the computed field: (computing
> compound interest)
>
> if( itemnonbb >= 0, ((itemnonbb * ((1 + (inflationpct/100))
> ^ inflationyrs)) - itemnonbb), 0)
>
> All of the fields used in the expression are type decimal.
>
> There seems to be a problem with the exponentiation operator
> followed by a field that is a decimal (but it worked like
> this in PB 10.2.1).
>
> My new expression looks like this:
>
> if( itemnonbb >= 0, ((itemnonbb * ((1 + (inflationpct/100))
> ^ number(string(inflationyrs)))) - itemnonbb), 0)
>
> It seems to work this way, now my question is what's the
> difference between the 2 PB versions and the exponentiation
> function?
>
> Any insight and further information is welcome.
>
> Thanks,
>
> -Leo


Leo leorj79 at hotmail dot com Posted on 2008-12-02 21:37:58.0Z
Sender: 41a4.4934327e.1804289383@sybase.com
From: Leo leorj79 at hotmail dot com
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: PB 11.5 DW computed field crash
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4935aab6.7a6e.1681692777@sybase.com>
References: <493570e2$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 2 Dec 2008 13:37:58 -0800
X-Trace: forums-1-dub 1228253878 10.22.241.41 (2 Dec 2008 13:37:58 -0800)
X-Original-Trace: 2 Dec 2008 13:37:58 -0800, 10.22.241.41
Lines: 2
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88273
Article PK: 417528

No, it doesn't.


M. Searer Posted on 2008-12-03 15:56:13.0Z
From: "M. Searer" <nospam@nospam.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <493570e2$1@forums-1-dub> <4935aab6.7a6e.1681692777@sybase.com>
In-Reply-To: <4935aab6.7a6e.1681692777@sybase.com>
Subject: Re: PB 11.5 DW computed field crash
Lines: 7
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Windows Mail 6.0.6001.18000
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18049
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4936ac1d@forums-1-dub>
Date: 3 Dec 2008 07:56:13 -0800
X-Trace: forums-1-dub 1228319773 10.22.241.152 (3 Dec 2008 07:56:13 -0800)
X-Original-Trace: 3 Dec 2008 07:56:13 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88281
Article PK: 417537

does it also cause an error, or does it give a different value than expected?

"Leo leorj79 at hotmail dot com" wrote in message news:4935aab6.7a6e.1681692777@sybase.com...
> No, it doesn't.


Leo leorj79 at hotmail dot com Posted on 2008-12-03 20:39:29.0Z
Sender: 41a4.4934327e.1804289383@sybase.com
From: Leo leorj79 at hotmail dot com
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: PB 11.5 DW computed field crash
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4936ee81.2b4c.1681692777@sybase.com>
References: <4936ac1d@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 3 Dec 2008 12:39:29 -0800
X-Trace: forums-1-dub 1228336769 10.22.241.41 (3 Dec 2008 12:39:29 -0800)
X-Original-Trace: 3 Dec 2008 12:39:29 -0800, 10.22.241.41
Lines: 17
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88284
Article PK: 417539

It also causes the same error.

The issue is that the expression in the computed field is
invalid because the exponentiation function expected a
"number" as an argument and for some reason PB 11.5 decided
that decimal is not a number anymore (the type of a dw
column). So the solution is to cast the result as a number.

The crash occurs because at the type of calling
getitemdecimal (or whatever type you want) the computed
field is null therefore with out a type, hence the type
mismatch.

My curiosity is still as to "why" PB 11.5 is different than
PB 10.2.

-Leo


Pat Madigan Posted on 2008-12-04 19:01:31.0Z
From: "Pat Madigan" <nobody@nowhere.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <4936ac1d@forums-1-dub> <4936ee81.2b4c.1681692777@sybase.com>
Subject: Re: PB 11.5 DW computed field crash
Lines: 26
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4938290b$1@forums-1-dub>
Date: 4 Dec 2008 11:01:31 -0800
X-Trace: forums-1-dub 1228417291 10.22.241.152 (4 Dec 2008 11:01:31 -0800)
X-Original-Trace: 4 Dec 2008 11:01:31 -0800, vip152.sybase.com
X-Authenticated-User: powerbuilder
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88301
Article PK: 417555

Crazy idea... put a "1.0 * " in front of the expression, so Powerbuilder
knows that it's a numeric value. (haven't tested this at all)

Pat

<Leo leorj79 at hotmail dot com> wrote in message
news:4936ee81.2b4c.1681692777@sybase.com...
> It also causes the same error.
>
> The issue is that the expression in the computed field is
> invalid because the exponentiation function expected a
> "number" as an argument and for some reason PB 11.5 decided
> that decimal is not a number anymore (the type of a dw
> column). So the solution is to cast the result as a number.
>
> The crash occurs because at the type of calling
> getitemdecimal (or whatever type you want) the computed
> field is null therefore with out a type, hence the type
> mismatch.
>
> My curiosity is still as to "why" PB 11.5 is different than
> PB 10.2.
>
> -Leo


Leo leorj79 at hotmail dot com Posted on 2008-12-07 20:12:10.0Z
Sender: 41a4.4934327e.1804289383@sybase.com
From: Leo leorj79 at hotmail dot com
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: PB 11.5 DW computed field crash
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <493c2e1a.3ad.1681692777@sybase.com>
References: <4938290b$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 7 Dec 2008 12:12:10 -0800
X-Trace: forums-1-dub 1228680730 10.22.241.41 (7 Dec 2008 12:12:10 -0800)
X-Original-Trace: 7 Dec 2008 12:12:10 -0800, 10.22.241.41
Lines: 31
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88330
Article PK: 417584

Pat,

the exponentiation invalidates the expression

> Crazy idea... put a "1.0 * " in front of the expression,
> so Powerbuilder knows that it's a numeric value.
> (haven't tested this at all)
>
> Pat
>
> <Leo leorj79 at hotmail dot com> wrote in message
> news:4936ee81.2b4c.1681692777@sybase.com...
> > It also causes the same error.
> >
> > The issue is that the expression in the computed field
> > is invalid because the exponentiation function expected
> > a "number" as an argument and for some reason PB 11.5
> > decided that decimal is not a number anymore (the type
> > of a dw column). So the solution is to cast the result
> as a number. >
> > The crash occurs because at the type of calling
> > getitemdecimal (or whatever type you want) the computed
> > field is null therefore with out a type, hence the type
> > mismatch.
> >
> > My curiosity is still as to "why" PB 11.5 is different
> > than PB 10.2.
> >
> > -Leo
>
>


M. Searer Posted on 2008-12-05 19:05:55.0Z
From: "M. Searer" <nospam@nospam.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <4936ac1d@forums-1-dub> <4936ee81.2b4c.1681692777@sybase.com>
In-Reply-To: <4936ee81.2b4c.1681692777@sybase.com>
Subject: Re: PB 11.5 DW computed field crash
Lines: 28
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Windows Mail 6.0.6001.18000
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18049
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <49397b93$1@forums-1-dub>
Date: 5 Dec 2008 11:05:55 -0800
X-Trace: forums-1-dub 1228503955 10.22.241.152 (5 Dec 2008 11:05:55 -0800)
X-Original-Trace: 5 Dec 2008 11:05:55 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88315
Article PK: 417570

are you saying that inflationpct needs to be cast to a 'number' or inflationyrs?
are they both columns, or is one/both another computed field?

your expression with just what ^ will operate on:
( 1 + (inflationpct/100) ) ^ inflationyrs)

If you can get this boiled down to a very simple external datawindow, then you can send it on to sybase to fix if it is a bug

"Leo leorj79 at hotmail dot com" wrote in message news:4936ee81.2b4c.1681692777@sybase.com...
> It also causes the same error.
>
> The issue is that the expression in the computed field is
> invalid because the exponentiation function expected a
> "number" as an argument and for some reason PB 11.5 decided
> that decimal is not a number anymore (the type of a dw
> column). So the solution is to cast the result as a number.
>
> The crash occurs because at the type of calling
> getitemdecimal (or whatever type you want) the computed
> field is null therefore with out a type, hence the type
> mismatch.
>
> My curiosity is still as to "why" PB 11.5 is different than
> PB 10.2.
>
> -Leo


Leo leorj79 at hotmail dot com Posted on 2008-12-05 22:13:58.0Z
Sender: 41a4.4934327e.1804289383@sybase.com
From: Leo leorj79 at hotmail dot com
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: PB 11.5 DW computed field crash
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4939a7a6.971.1681692777@sybase.com>
References: <49397b93$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 5 Dec 2008 14:13:58 -0800
X-Trace: forums-1-dub 1228515238 10.22.241.41 (5 Dec 2008 14:13:58 -0800)
X-Original-Trace: 5 Dec 2008 14:13:58 -0800, 10.22.241.41
Lines: 34
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88323
Article PK: 417575

inflationyrs needs to be cast. Please, see the original
thread.

> are you saying that inflationpct needs to be cast to a
> 'number' or inflationyrs? are they both columns, or is
> one/both another computed field?
>
> your expression with just what ^ will operate on:
> ( 1 + (inflationpct/100) ) ^ inflationyrs)
>
> If you can get this boiled down to a very simple external
> datawindow, then you can send it on to sybase to fix if it
> is a bug
>
>
>
> "Leo leorj79 at hotmail dot com" wrote in message
> > news:4936ee81.2b4c.1681692777@sybase.com... It also
> > causes the same error.
> > The issue is that the expression in the computed field
> > is invalid because the exponentiation function expected
> > a "number" as an argument and for some reason PB 11.5
> > decided that decimal is not a number anymore (the type
> > of a dw column). So the solution is to cast the result
> > as a number.
> > The crash occurs because at the type of calling
> > getitemdecimal (or whatever type you want) the computed
> > field is null therefore with out a type, hence the type
> > mismatch.
> >
> > My curiosity is still as to "why" PB 11.5 is different
> > than PB 10.2.
> >
> > -Leo


Leo leorj79 at hotmail dot com Posted on 2008-12-08 23:05:49.0Z
Sender: 327b.493da6ef.1804289383@sybase.com
From: Leo leorj79 at hotmail dot com
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: PB 11.5 DW computed field crash
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <493da84d.329b.1681692777@sybase.com>
References: <49397b93$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 8 Dec 2008 15:05:49 -0800
X-Trace: forums-1-dub 1228777549 10.22.241.41 (8 Dec 2008 15:05:49 -0800)
X-Original-Trace: 8 Dec 2008 15:05:49 -0800, 10.22.241.41
Lines: 8
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88345
Article PK: 417599

You're right.

Actually, something like "2 ^ inflationyrs" will throw a
"Expecting NUMBER expression" validation error.

They are both columns.

-Leo


Scott Morris Posted on 2008-12-10 21:37:16.0Z
From: "Scott Morris" <bogus@bogus.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <49397b93$1@forums-1-dub> <493da84d.329b.1681692777@sybase.com>
Subject: Re: PB 11.5 DW computed field crash
Lines: 17
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4940368c@forums-1-dub>
Date: 10 Dec 2008 13:37:16 -0800
X-Trace: forums-1-dub 1228945036 10.22.241.152 (10 Dec 2008 13:37:16 -0800)
X-Original-Trace: 10 Dec 2008 13:37:16 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88377
Article PK: 417628


<Leo leorj79 at hotmail dot com> wrote in message
news:493da84d.329b.1681692777@sybase.com...
> You're right.
>
> Actually, something like "2 ^ inflationyrs" will throw a
> "Expecting NUMBER expression" validation error.
>
> They are both columns.

Looks like there is a fix for 11.2 in build 8669 - bug 542210. You can look
in the 11.5 EBFs for the same fix. If not out already, then it should be in
the next EBF or so. This is why it is always a good reason to look at the
fixlists in the EBFs for the version you are currently using (and perhaps
the prior one if you are using the most current) - saves a lot of effort in
diagnosing a problem that has already been identified (and fixed!).