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.

getitemstring fails in nvo on column with ddlb

3 posts in Objects Last posting was on 2005-02-22 12:42:56.0Z
Keith Roberts Posted on 2005-02-21 18:01:20.0Z
Sender: 2dad.421a12fe.1804289383@sybase.com
From: Keith Roberts
Newsgroups: sybase.public.powerbuilder.objects
Subject: getitemstring fails in nvo on column with ddlb
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <421a21ec.2e21.1681692777@sybase.com>
X-Original-NNTP-Posting-Host: 10.22.241.42
X-Original-Trace: 21 Feb 2005 10:01:16 -0800, 10.22.241.42
Lines: 32
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 21 Feb 2005 10:01:17 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 21 Feb 2005 10:01:20 -0800
X-Trace: forums-1-dub 1109008880 10.22.108.75 (21 Feb 2005 10:01:20 -0800)
X-Original-Trace: 21 Feb 2005 10:01:20 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:8217
Article PK: 735482

I am using PB 10.01 (no ebfs applied). I have created a nvo
that takes a dw as the argument. In the function, I check
the status of the column. If the columns is DataModified!,
I will capture the original data and the current data and
write a record to an audit table. In the datawindow, there
is a column used for status. In MySQL, this field is
defined as a varchar column, which allows 30 characters. In
the datawindow, the field is defined as char(3) with an edit
style of ddlb, with hard coded values.

When I try to access the field using a GetItemString, I get
the following error:

Application terminated.

Error: DataWindow column type does not match GetItem type at
line 59 in function nvo_audit_tracking of object
n_audit_record.

The code is:
ls_originalvalue = ldw_record.GetItemString ( ll_row,
li_column, Primary!, True)

or
ls_newvalue = ldw_record.GetItemString ( ll_row, li_column,
Primary!, False)

It does not matter which buffer I read, I get the same
error. The value of ll_row is 1 and the value of li_column
is 1.

Any ideas, suggestions, or tips will be greatly appreciated.


Keith Roberts Posted on 2005-02-21 22:04:17.0Z
Sender: 7b5c.421a3dc5.1804289383@sybase.com
From: Keith Roberts
Newsgroups: sybase.public.powerbuilder.objects
Subject: Figured it out - caused by computed column on dw
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <421a5ae1.7c40.1681692777@sybase.com>
References: <421a21ec.2e21.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 21 Feb 2005 14:04:17 -0800
X-Trace: forums-1-dub 1109023457 10.22.241.41 (21 Feb 2005 14:04:17 -0800)
X-Original-Trace: 21 Feb 2005 14:04:17 -0800, 10.22.241.41
Lines: 41
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:8218
Article PK: 735483

The first two columns on the datawindow are computed
columns. To bypass these, I checked the return code on the
dw_1.SetColumn ( li_column ) statement. If it was a 1, then
I processed the column. Anything else, I bypassed the
column and looped to the next column. The error has
disappeared.

> I am using PB 10.01 (no ebfs applied). I have created a
> nvo that takes a dw as the argument. In the function, I
> check the status of the column. If the columns is
> DataModified!, I will capture the original data and the
> current data and write a record to an audit table. In the
> datawindow, there is a column used for status. In MySQL,
> this field is defined as a varchar column, which allows 30
> characters. In the datawindow, the field is defined as
> char(3) with an edit style of ddlb, with hard coded
> values.
>
> When I try to access the field using a GetItemString, I
> get the following error:
>
> Application terminated.
>
> Error: DataWindow column type does not match GetItem type
> at line 59 in function nvo_audit_tracking of object
> n_audit_record.
>
> The code is:
> ls_originalvalue = ldw_record.GetItemString ( ll_row,
> li_column, Primary!, True)
>
> or
> ls_newvalue = ldw_record.GetItemString ( ll_row, li_column
> , Primary!, False)
>
> It does not matter which buffer I read, I get the same
> error. The value of ll_row is 1 and the value of
> li_column is 1.
>
> Any ideas, suggestions, or tips will be greatly
> appreciated.


Chris Pollach Posted on 2005-02-22 12:42:56.0Z
From: "Chris Pollach" <PollachC@SCC-CSC.gc.ca>
Newsgroups: sybase.public.powerbuilder.objects
References: <421a21ec.2e21.1681692777@sybase.com>
Subject: Re: getitemstring fails in nvo on column with ddlb
Lines: 52
Organization: The Supreme Court of Canada
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1478
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1478
NNTP-Posting-Host: firewall.scc-csc.gc.ca
X-Original-NNTP-Posting-Host: firewall.scc-csc.gc.ca
Message-ID: <421b28d0$1@forums-1-dub>
Date: 22 Feb 2005 04:42:56 -0800
X-Trace: forums-1-dub 1109076176 209.47.227.130 (22 Feb 2005 04:42:56 -0800)
X-Original-Trace: 22 Feb 2005 04:42:56 -0800, firewall.scc-csc.gc.ca
X-Authenticated-User: pbtenbeta
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:8219
Article PK: 735484

Keith;

Sounds like PB is not seeing the DB column types correctly during the DW
creation. If the column type or length does not match at run time PB
terminates because it does an SQL "Describe" on the result set and matches
this to the expected data types in the DW object.

To get around this problem you can export the DW to it's source and change
the column to Char(30) and then import (recompile) the DW object. This is
only a temporary fix though. Again the real reason is why is PB no seeing
the column types correctly?

What version of PB, MySQL and O/S are you using?

Regards ... Chris

<Keith Roberts> wrote in message news:421a21ec.2e21.1681692777@sybase.com...
> I am using PB 10.01 (no ebfs applied). I have created a nvo
> that takes a dw as the argument. In the function, I check
> the status of the column. If the columns is DataModified!,
> I will capture the original data and the current data and
> write a record to an audit table. In the datawindow, there
> is a column used for status. In MySQL, this field is
> defined as a varchar column, which allows 30 characters. In
> the datawindow, the field is defined as char(3) with an edit
> style of ddlb, with hard coded values.
>
> When I try to access the field using a GetItemString, I get
> the following error:
>
> Application terminated.
>
> Error: DataWindow column type does not match GetItem type at
> line 59 in function nvo_audit_tracking of object
> n_audit_record.
>
> The code is:
> ls_originalvalue = ldw_record.GetItemString ( ll_row,
> li_column, Primary!, True)
>
> or
> ls_newvalue = ldw_record.GetItemString ( ll_row, li_column,
> Primary!, False)
>
> It does not matter which buffer I read, I get the same
> error. The value of ll_row is 1 and the value of li_column
> is 1.
>
> Any ideas, suggestions, or tips will be greatly appreciated.