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.

getrow returning incorrect row

3 posts in DataWindow Last posting was on 2008-05-19 18:10:18.0Z
Jeff Gibson Posted on 2008-05-18 20:32:24.0Z
Reply-To: "Jeff Gibson" <jgibson@interceptsolutions.com>
From: "Jeff Gibson" <jgibson@interceptsolutions.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: getrow returning incorrect row
Lines: 45
Organization: Intercept Solutions
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1914
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1914
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48309258@forums-1-dub>
Date: 18 May 2008 13:32:24 -0700
X-Trace: forums-1-dub 1211142744 10.22.241.152 (18 May 2008 13:32:24 -0700)
X-Original-Trace: 18 May 2008 13:32:24 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:86885
Article PK: 416143

Any help on this would REALLY be appreciated.

I have two dddw's on my main datawindow. The first one is for customers,
and the second is for customer contacts. We need the ability to either
select a name or type a name in, so both dddw's are set to allow edit. On
both dddw columns, both the data column and display column are set to the
same thing.

The column and dddw info is as follows

osd_cust_name - actual datawindow column for the customer - varchar(60)
customer_name - dddw display column - varchar(60)
customer_name - dddw data column - varchar(60)

osd_cust_con_name - actual datawindow column for the customer contact -
varchar(40)
cust_con_name - dddw display column - varchar(40)
cust_con_name - dddw data column - varchar(40)

Before we retrieve the main datawindow I get a handle to each of the dddw's.
The customer dddw does not require an argument, but the customer contact
dddw requires the key from the customer row that is selected. After getting
the handles to the dddw's I retrieve the main datawindow. After the
retrieve I get the current row from the customer dddw, then do a
getitemdecimal on the customer dddw in order to get that customer key. That
is where the problem comes in. After the main retrieve, the customer dddw
selects the correct row which is row 11. However, when I do the getrow
against the handle to the dddw, it keeps returning 1. Even if I'm entering
a new row, it still keeps telling me it's on row one. I turned off the
allowedit, but it still does the same thing.

Maybe I'm missing something. Is this the way a dddw is supposed to work in
this situation? I would have figured since the dddw showed row 11 selected,
the getrow should return row 11. Is this because the main datawindows
column name does not match the dddw's data column selection? Any
suggestions would be greatly appreciated. I'm sure I must be missing
something here. FWIW, this is being ran in PB7.0.3 (Build 10312).

TIA

Jeff Gibson
Intercept Solutions - Sybase SQL Anywhere OEM Partner
Nashville, TN


"Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel Posted on 2008-05-18 22:45:44.0Z
From: "Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <48309258@forums-1-dub>
Subject: Re: getrow returning incorrect row
Lines: 60
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.5512
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4830b198$1@forums-1-dub>
Date: 18 May 2008 15:45:44 -0700
X-Trace: forums-1-dub 1211150744 10.22.241.152 (18 May 2008 15:45:44 -0700)
X-Original-Trace: 18 May 2008 15:45:44 -0700, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:86886
Article PK: 416144

As you have seen, row in a DDDW (or DataWindowChild) is not really useful. A
more reliable method is to put the key column in the DDDW (you don't have to
display it), use GetItemWhatever on the underlying column, then use that as
part of the search string in a Find on the DWC.

"Jeff Gibson" <jgibson@interceptsolutions.com> wrote in message
news:48309258@forums-1-dub...
> Any help on this would REALLY be appreciated.
>
> I have two dddw's on my main datawindow. The first one is for customers,
> and the second is for customer contacts. We need the ability to either
> select a name or type a name in, so both dddw's are set to allow edit. On
> both dddw columns, both the data column and display column are set to the
> same thing.
>
> The column and dddw info is as follows
>
> osd_cust_name - actual datawindow column for the customer - varchar(60)
> customer_name - dddw display column - varchar(60)
> customer_name - dddw data column - varchar(60)
>
> osd_cust_con_name - actual datawindow column for the customer contact -
> varchar(40)
> cust_con_name - dddw display column - varchar(40)
> cust_con_name - dddw data column - varchar(40)
>
> Before we retrieve the main datawindow I get a handle to each of the
> dddw's.
> The customer dddw does not require an argument, but the customer contact
> dddw requires the key from the customer row that is selected. After
> getting
> the handles to the dddw's I retrieve the main datawindow. After the
> retrieve I get the current row from the customer dddw, then do a
> getitemdecimal on the customer dddw in order to get that customer key.
> That
> is where the problem comes in. After the main retrieve, the customer dddw
> selects the correct row which is row 11. However, when I do the getrow
> against the handle to the dddw, it keeps returning 1. Even if I'm
> entering
> a new row, it still keeps telling me it's on row one. I turned off the
> allowedit, but it still does the same thing.
>
> Maybe I'm missing something. Is this the way a dddw is supposed to work
> in
> this situation? I would have figured since the dddw showed row 11
> selected,
> the getrow should return row 11. Is this because the main datawindows
> column name does not match the dddw's data column selection? Any
> suggestions would be greatly appreciated. I'm sure I must be missing
> something here. FWIW, this is being ran in PB7.0.3 (Build 10312).
>
> TIA
>
> Jeff Gibson
> Intercept Solutions - Sybase SQL Anywhere OEM Partner
> Nashville, TN
>
>


Jeff Gibson Posted on 2008-05-19 18:10:18.0Z
Reply-To: "Jeff Gibson" <jgibson@interceptsolutions.com>
From: "Jeff Gibson" <jgibson@interceptsolutions.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <48309258@forums-1-dub> <4830b198$1@forums-1-dub>
Subject: Re: getrow returning incorrect row
Lines: 79
Organization: Intercept Solutions
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; Response
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4831c28a$1@forums-1-dub>
Date: 19 May 2008 11:10:18 -0700
X-Trace: forums-1-dub 1211220618 10.22.241.152 (19 May 2008 11:10:18 -0700)
X-Original-Trace: 19 May 2008 11:10:18 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:86889
Article PK: 416145

That's actually what we have done Jerry.

The dddw datawindow has the key in the result set. I have to say, I've
never had a problem doing a getrow against a dddw where the data column name
matches the main datawindows column name.

I did end up setting up a find, and that did the job for me. My initial
thought was that this might be a bug.

Jeff Gibson
Intercept Solutions - Sybase SQL Anywhere OEM Partner
Nashville, TN

"Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com> wrote in message
news:4830b198$1@forums-1-dub...
> As you have seen, row in a DDDW (or DataWindowChild) is not really useful.
> A more reliable method is to put the key column in the DDDW (you don't
> have to display it), use GetItemWhatever on the underlying column, then
> use that as part of the search string in a Find on the DWC.
>
> "Jeff Gibson" <jgibson@interceptsolutions.com> wrote in message
> news:48309258@forums-1-dub...
>> Any help on this would REALLY be appreciated.
>>
>> I have two dddw's on my main datawindow. The first one is for customers,
>> and the second is for customer contacts. We need the ability to either
>> select a name or type a name in, so both dddw's are set to allow edit.
>> On
>> both dddw columns, both the data column and display column are set to the
>> same thing.
>>
>> The column and dddw info is as follows
>>
>> osd_cust_name - actual datawindow column for the customer - varchar(60)
>> customer_name - dddw display column - varchar(60)
>> customer_name - dddw data column - varchar(60)
>>
>> osd_cust_con_name - actual datawindow column for the customer contact -
>> varchar(40)
>> cust_con_name - dddw display column - varchar(40)
>> cust_con_name - dddw data column - varchar(40)
>>
>> Before we retrieve the main datawindow I get a handle to each of the
>> dddw's.
>> The customer dddw does not require an argument, but the customer contact
>> dddw requires the key from the customer row that is selected. After
>> getting
>> the handles to the dddw's I retrieve the main datawindow. After the
>> retrieve I get the current row from the customer dddw, then do a
>> getitemdecimal on the customer dddw in order to get that customer key.
>> That
>> is where the problem comes in. After the main retrieve, the customer
>> dddw
>> selects the correct row which is row 11. However, when I do the getrow
>> against the handle to the dddw, it keeps returning 1. Even if I'm
>> entering
>> a new row, it still keeps telling me it's on row one. I turned off the
>> allowedit, but it still does the same thing.
>>
>> Maybe I'm missing something. Is this the way a dddw is supposed to work
>> in
>> this situation? I would have figured since the dddw showed row 11
>> selected,
>> the getrow should return row 11. Is this because the main datawindows
>> column name does not match the dddw's data column selection? Any
>> suggestions would be greatly appreciated. I'm sure I must be missing
>> something here. FWIW, this is being ran in PB7.0.3 (Build 10312).
>>
>> TIA
>>
>> Jeff Gibson
>> Intercept Solutions - Sybase SQL Anywhere OEM Partner
>> Nashville, TN
>>
>>
>
>