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.

Settransobject refresher

3 posts in DataWindow Last posting was on 2009-10-26 16:47:41.0Z
Jeff Gibson Posted on 2009-10-24 09:18:44.0Z
Reply-To: "Jeff Gibson" <jgibson@interceptsolutions.com>
From: "Jeff Gibson" <jgibson@interceptsolutions.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Settransobject refresher
Lines: 32
Organization: Intercept Solutions
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4ae2c674$1@forums-1-dub>
Date: 24 Oct 2009 02:18:44 -0700
X-Trace: forums-1-dub 1256375924 10.22.241.152 (24 Oct 2009 02:18:44 -0700)
X-Original-Trace: 24 Oct 2009 02:18:44 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:90142
Article PK: 409747

I've run into an issue on a datawindow that has an editable dddw. This
datawindow has a couple hundred rows, so each row has its own dddw.

If the user types a manual entry into the dddw (in lieu of selecting from
the list), and we do not find that entry in the list, we add the new entry
to the table, and re-retrieve the dddw when the rocfocuschanging event is
firing on the main datawindow.

My question is this. When we would get to the part of the code that would
re-retrieve the dddw (against the child handle we have), it would complain
about the transaction object not being set.

This is set on the open of the window. And from what I've looked at, I
didn't think I was doing anything that could blow the transaction object
away. I know the pointer is still good.

Once I added a "li_settrans1 = idwc_agency_title.settransobject(sqlca)"
before the re-retrieve, everything started working just fine.

Now don't get me wrong, I'm glad it's working. I'm just wanting to know
"WHY" my transaction object was blown away. No modifies going on here.

Any enlightenment would be greatly appreciated. I'm running PB 11.5.1 Build
4566. I'm sure I'm missing something obvious here, so be nice to me. ;-)

TIA.

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


Philip Salgannik Posted on 2009-10-26 16:47:41.0Z
From: "Philip Salgannik" <philip@MeMyselfAndI.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <4ae2c674$1@forums-1-dub>
Subject: Re: Settransobject refresher
Lines: 16
Organization: MeMyselfAndI
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4ae5d2ad@forums-1-dub>
Date: 26 Oct 2009 08:47:41 -0800
X-Trace: forums-1-dub 1256575661 10.22.241.152 (26 Oct 2009 08:47:41 -0800)
X-Original-Trace: 26 Oct 2009 08:47:41 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:90144
Article PK: 409749


"Jeff Gibson" <jgibson@interceptsolutions.com> wrote in message
news:4ae2c674$1@forums-1-dub...
> I've run into an issue on a datawindow that has an editable dddw. This
> datawindow has a couple hundred rows, so each row has its own dddw.
>
> If the user types a manual entry into the dddw (in lieu of selecting from
> the list), and we do not find that entry in the list, we add the new entry
> to the table, and re-retrieve the dddw when the rocfocuschanging event is
> firing on the main datawindow.

Just out of curiosity, why bother with re-retrieval? If you know that your
"add the new entry to the table" succeeded, why not just stick the new entry
into the dropdown?


Jeremy Lakeman Posted on 2009-10-24 10:38:23.0Z
From: Jeremy Lakeman <jeremy.lakeman@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Settransobject refresher
Date: Sat, 24 Oct 2009 03:38:23 -0700 (PDT)
Organization: http://groups.google.com
Lines: 48
Message-ID: <71dd7e5e-5641-40f5-8903-fc55f5659988@j9g2000prh.googlegroups.com>
References: <4ae2c674$1@forums-1-dub>
NNTP-Posting-Host: 219.90.186.150
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1256380703 28877 127.0.0.1 (24 Oct 2009 10:38:23 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Sat, 24 Oct 2009 10:38:23 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: j9g2000prh.googlegroups.com; posting-host=219.90.186.150; posting-account=euaBtgoAAAC_vDxfsxmpMKlBxHaHpmRS
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729),gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!newsfeed.news2me.com!news.glorb.com!news2.glorb.com!postnews.google.com!j9g2000prh.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:90143
Article PK: 409750

On Oct 24, 7:18 pm, "Jeff Gibson" <jgib...@interceptsolutions.com>

wrote:
> I've run into an issue on a datawindow that has an editable dddw.  This
> datawindow has a couple hundred rows, so each row has its own dddw.
>
> If the user types a manual entry into the dddw (in lieu of selecting from
> the list), and we do not find that entry in the list, we add the new entry
> to the table, and re-retrieve the dddw when the rocfocuschanging event is
> firing on the main datawindow.
>
> My question is this.  When we would get to the part of the code that would
> re-retrieve the dddw (against the child handle we have), it would complain
> about the transaction object not being set.
>
> This is set on the open of the window.  And from what I've looked at, I
> didn't think I was doing anything that could blow the transaction object
> away.  I know the pointer is still good.
>
> Once I added a "li_settrans1 = idwc_agency_title.settransobject(sqlca)"
> before the re-retrieve, everything started working just fine.
>
> Now don't get me wrong, I'm glad it's working.  I'm just wanting to know
> "WHY" my transaction object was blown away.  No modifies going on here.
>
> Any enlightenment would be greatly appreciated. I'm running PB 11.5.1 Build
> 4566.  I'm sure I'm missing something obvious here, so be nice to me.  ;-)
>
> TIA.
>
> Jeff Gibson
> Intercept Solutions - Sybase SQL Anywhere OEM Partner
> Nashville, TN

(There's only one instance of the dddw, but I hope you already know
that)

There's a number of things you can do to a datawindow that will
invalidate the datawindowchild reference, eg modifies of any
expressions of the dddw.

You might be better off getting a new datawindowchild and always
calling settransobject on it.