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.

DBCancel and SP based DW

15 posts in DataWindow Last posting was on 2009-03-19 23:20:36.0Z
newbie Posted on 2009-01-13 13:02:03.0Z
From: "newbie" <newbie@msdn.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Organization: 193.121.160.69
X-Newsreader: AspNNTP 1.50 (JodoHost)
Subject: DBCancel and SP based DW
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <496c90cb$1@forums-1-dub>
Date: 13 Jan 2009 05:02:03 -0800
X-Trace: forums-1-dub 1231851723 10.22.241.152 (13 Jan 2009 05:02:03 -0800)
X-Original-Trace: 13 Jan 2009 05:02:03 -0800, vip152.sybase.com
Lines: 14
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88574
Article PK: 417828

Hi,
I'm setting Async mode, everything works fine (I can cancel retrieval before
first row "arrives") while I'm using SQL based DW.

When I try to do the same with SP based DW I have to wait for first row to get
DBCancel() processed. Is it how it should work ?

Env :
XP Prof SP3,
PB 10.5.1 b 6551 (I know it's old) Ent.
DB - 10.2.0.3.0 Enterprise
Native connection
---== Posted via the PFCGuide Web Newsreader ==---
http://www.pfcguide.com/_newsgroups/group_list.asp


Chris Pollach Posted on 2009-01-13 13:33:15.0Z
From: "Chris Pollach" <cpollach@travel-net.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <496c90cb$1@forums-1-dub>
Subject: Re: DBCancel and SP based DW
Lines: 45
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.3350
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <496c981b$1@forums-1-dub>
Date: 13 Jan 2009 05:33:15 -0800
X-Trace: forums-1-dub 1231853595 10.22.241.152 (13 Jan 2009 05:33:15 -0800)
X-Original-Trace: 13 Jan 2009 05:33:15 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88575
Article PK: 417829

The reason you can do this for an SQL based DWO is that when the DW runs
an SQL statement it actually does allot more than just that one piece of
SQL. For example in a Select, the DWO object actually issues a Declare,
Prepare, Execute, Fetch, etc. During these SQL verbs there is a constant
interaction with the DBMS and thus a chance for your DBCancel to come into
play.

For a SP call, control passes to the SP which can issue many other SQL
statements but they happen on the server. Since no client interaction is
present during the SP execution the DBCancel is queued to be sent when the
next packet is received from the DB server. In the SP's case, the 1st packet
would contain the 1st set of blocked rows of the result set.

If there is a requirement by the application user to allow the
transaction in progress to be cancelled - then you either have to stop using
the SP and incorporate the SQL in the DWO (or some combination of DWO's) or
look at multi-threading using the SharedObject approach.

HTH

--
Regards ... Chris
ISUG - NA RUG Director
http://chrispollach.pbdjmagazine.com

"newbie" <newbie@msdn.com> wrote in message news:496c90cb$1@forums-1-dub...
> Hi,
> I'm setting Async mode, everything works fine (I can cancel retrieval
> before
> first row "arrives") while I'm using SQL based DW.
>
> When I try to do the same with SP based DW I have to wait for first row to
> get
> DBCancel() processed. Is it how it should work ?
>
> Env :
> XP Prof SP3,
> PB 10.5.1 b 6551 (I know it's old) Ent.
> DB - 10.2.0.3.0 Enterprise
> Native connection
> ---== Posted via the PFCGuide Web Newsreader ==---
> http://www.pfcguide.com/_newsgroups/group_list.asp


Bruce Armstrong [TeamSybase] Posted on 2009-01-13 14:47:18.0Z
From: "Bruce Armstrong [TeamSybase]" <NOCANSPAM_bruce.armstrong@teamsybase.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: DBCancel and SP based DW
Organization: TeamSybase
Reply-To: NOCANSPAM_bruce.armstrong@teamsybase.com
Message-ID: <99apm49397fup3h4pier5qmmrbjvb6cs0o@4ax.com>
References: <496c90cb$1@forums-1-dub> <496c981b$1@forums-1-dub>
X-Newsreader: Forte Agent 5.00/32.1171
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 13 Jan 2009 06:47:18 -0800
X-Trace: forums-1-dub 1231858038 10.22.241.152 (13 Jan 2009 06:47:18 -0800)
X-Original-Trace: 13 Jan 2009 06:47:18 -0800, vip152.sybase.com
Lines: 37
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88580
Article PK: 417834

The whole point of enabling Async is so you can send something like a
DBCancel before the database responds to the client. I know it works
for Oracle connections.

On 13 Jan 2009 05:33:15 -0800, "Chris Pollach"

<cpollach@travel-net.com> wrote:

> The reason you can do this for an SQL based DWO is that when the DW runs
>an SQL statement it actually does allot more than just that one piece of
>SQL. For example in a Select, the DWO object actually issues a Declare,
>Prepare, Execute, Fetch, etc. During these SQL verbs there is a constant
>interaction with the DBMS and thus a chance for your DBCancel to come into
>play.
>
> For a SP call, control passes to the SP which can issue many other SQL
>statements but they happen on the server. Since no client interaction is
>present during the SP execution the DBCancel is queued to be sent when the
>next packet is received from the DB server. In the SP's case, the 1st packet
>would contain the 1st set of blocked rows of the result set.
>
> If there is a requirement by the application user to allow the
>transaction in progress to be cancelled - then you either have to stop using
>the SP and incorporate the SQL in the DWO (or some combination of DWO's) or
>look at multi-threading using the SharedObject approach.
>
>HTH

-----------------------------------

My Web 2.0 Stuff

Blog: http://bruce.pbdjmagazine.com/
Facebook: http://www.facebook.com/people/Bruce-Armstrong/1600223798
Fotki: http://public.fotki.com/brucearmstrong/
LinkedIn: http://www.linkedin.com/in/bruceaarmstrong
Twitter: http://twitter.com/bruce_armstrong
YouTube: http://www.youtube.com/user/brucearmstrong


Chris Pollach Posted on 2009-01-13 14:55:07.0Z
From: "Chris Pollach" <cpollach@travel-net.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <496c90cb$1@forums-1-dub> <496c981b$1@forums-1-dub> <99apm49397fup3h4pier5qmmrbjvb6cs0o@4ax.com>
Subject: Re: DBCancel and SP based DW
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.3350
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <496cab4b$1@forums-1-dub>
Date: 13 Jan 2009 06:55:07 -0800
X-Trace: forums-1-dub 1231858507 10.22.241.152 (13 Jan 2009 06:55:07 -0800)
X-Original-Trace: 13 Jan 2009 06:55:07 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88583
Article PK: 417836

Hi Bruce;

Another excellent point that I should of made. The interaction between
the client and the server is based on how well the DBMS client was written.
Since PB's DB driver is really just a hand-shake to actual DB client driver
(or middleware) - it will be in the communication implementation techniques
used therein that will determine the effectiveness of the DBCancel command.
Thus, the effectiveness as you point will often vary by DBMS vendor or
connectivity mechanism.

Thanks for that comment!

--
Regards ... Chris
ISUG - NA RUG Director
http://chrispollach.pbdjmagazine.com


"Bruce Armstrong [TeamSybase]" <NOCANSPAM_bruce.armstrong@teamsybase.com>

wrote in message news:99apm49397fup3h4pier5qmmrbjvb6cs0o@4ax.com...
>
> The whole point of enabling Async is so you can send something like a
> DBCancel before the database responds to the client. I know it works
> for Oracle connections.
>
> On 13 Jan 2009 05:33:15 -0800, "Chris Pollach"
> <cpollach@travel-net.com> wrote:
>
>> The reason you can do this for an SQL based DWO is that when the DW runs
>>an SQL statement it actually does allot more than just that one piece of
>>SQL. For example in a Select, the DWO object actually issues a Declare,
>>Prepare, Execute, Fetch, etc. During these SQL verbs there is a constant
>>interaction with the DBMS and thus a chance for your DBCancel to come into
>>play.
>>
>> For a SP call, control passes to the SP which can issue many other SQL
>>statements but they happen on the server. Since no client interaction is
>>present during the SP execution the DBCancel is queued to be sent when the
>>next packet is received from the DB server. In the SP's case, the 1st
>>packet
>>would contain the 1st set of blocked rows of the result set.
>>
>> If there is a requirement by the application user to allow the
>>transaction in progress to be cancelled - then you either have to stop
>>using
>>the SP and incorporate the SQL in the DWO (or some combination of DWO's)
>>or
>>look at multi-threading using the SharedObject approach.
>>
>>HTH
> -----------------------------------
>
> My Web 2.0 Stuff
>
> Blog: http://bruce.pbdjmagazine.com/
> Facebook: http://www.facebook.com/people/Bruce-Armstrong/1600223798
> Fotki: http://public.fotki.com/brucearmstrong/
> LinkedIn: http://www.linkedin.com/in/bruceaarmstrong
> Twitter: http://twitter.com/bruce_armstrong
> YouTube: http://www.youtube.com/user/brucearmstrong


Bruce Armstrong [TeamSybase] Posted on 2009-01-13 22:42:46.0Z
From: "Bruce Armstrong [TeamSybase]" <NOCANSPAM_bruce.armstrong@teamsybase.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <496c90cb$1@forums-1-dub> <496c981b$1@forums-1-dub> <99apm49397fup3h4pier5qmmrbjvb6cs0o@4ax.com> <496cab4b$1@forums-1-dub>
Subject: Re: DBCancel and SP based DW
Lines: 86
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
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: <496d18e6$1@forums-1-dub>
Date: 13 Jan 2009 14:42:46 -0800
X-Trace: forums-1-dub 1231886566 10.22.241.152 (13 Jan 2009 14:42:46 -0800)
X-Original-Trace: 13 Jan 2009 14:42:46 -0800, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88591
Article PK: 417847

Actually, I think you missed my point. You implied that a response to the
cleint was required to implement the DBCancel. My point was that was the
whole reason for the Async parameter, to allow for the command to be send to
the database while the request was still processing.

--
-----------------------------------

My Web 2.0 Stuff

Blog: http://bruce.pbdjmagazine.com/
Facebook: http://www.facebook.com/people/Bruce-Armstrong/1600223798
Fotki: http://public.fotki.com/brucearmstrong/
LinkedIn: http://www.linkedin.com/in/bruceaarmstrong
Twitter: http://twitter.com/bruce_armstrong
YouTube: http://www.youtube.com/user/brucearmstrong

"Chris Pollach" <cpollach@travel-net.com> wrote in message
news:496cab4b$1@forums-1-dub...
> Hi Bruce;
>
> Another excellent point that I should of made. The interaction between
> the client and the server is based on how well the DBMS client was
> written. Since PB's DB driver is really just a hand-shake to actual DB
> client driver (or middleware) - it will be in the communication
> implementation techniques used therein that will determine the
> effectiveness of the DBCancel command. Thus, the effectiveness as you
> point will often vary by DBMS vendor or connectivity mechanism.
>
> Thanks for that comment!
>
> --
> Regards ... Chris
> ISUG - NA RUG Director
> http://chrispollach.pbdjmagazine.com
>
>
> "Bruce Armstrong [TeamSybase]" <NOCANSPAM_bruce.armstrong@teamsybase.com>
> wrote in message news:99apm49397fup3h4pier5qmmrbjvb6cs0o@4ax.com...
>>
>> The whole point of enabling Async is so you can send something like a
>> DBCancel before the database responds to the client. I know it works
>> for Oracle connections.
>>
>> On 13 Jan 2009 05:33:15 -0800, "Chris Pollach"
>> <cpollach@travel-net.com> wrote:
>>
>>> The reason you can do this for an SQL based DWO is that when the DW
>>> runs
>>>an SQL statement it actually does allot more than just that one piece of
>>>SQL. For example in a Select, the DWO object actually issues a Declare,
>>>Prepare, Execute, Fetch, etc. During these SQL verbs there is a constant
>>>interaction with the DBMS and thus a chance for your DBCancel to come
>>>into
>>>play.
>>>
>>> For a SP call, control passes to the SP which can issue many other
>>> SQL
>>>statements but they happen on the server. Since no client interaction is
>>>present during the SP execution the DBCancel is queued to be sent when
>>>the
>>>next packet is received from the DB server. In the SP's case, the 1st
>>>packet
>>>would contain the 1st set of blocked rows of the result set.
>>>
>>> If there is a requirement by the application user to allow the
>>>transaction in progress to be cancelled - then you either have to stop
>>>using
>>>the SP and incorporate the SQL in the DWO (or some combination of DWO's)
>>>or
>>>look at multi-threading using the SharedObject approach.
>>>
>>>HTH
>> -----------------------------------
>>
>> My Web 2.0 Stuff
>>
>> Blog: http://bruce.pbdjmagazine.com/
>> Facebook: http://www.facebook.com/people/Bruce-Armstrong/1600223798
>> Fotki: http://public.fotki.com/brucearmstrong/
>> LinkedIn: http://www.linkedin.com/in/bruceaarmstrong
>> Twitter: http://twitter.com/bruce_armstrong
>> YouTube: http://www.youtube.com/user/brucearmstrong
>
>


Chris Pollach Posted on 2009-01-14 13:13:43.0Z
From: "Chris Pollach" <cpollach@travel-net.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <496c90cb$1@forums-1-dub> <496c981b$1@forums-1-dub> <99apm49397fup3h4pier5qmmrbjvb6cs0o@4ax.com> <496cab4b$1@forums-1-dub> <496d18e6$1@forums-1-dub>
Subject: Re: DBCancel and SP based DW
Lines: 96
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <496de507$1@forums-1-dub>
Date: 14 Jan 2009 05:13:43 -0800
X-Trace: forums-1-dub 1231938823 10.22.241.152 (14 Jan 2009 05:13:43 -0800)
X-Original-Trace: 14 Jan 2009 05:13:43 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88599
Article PK: 417854

I agree .. but its how well the DBMS is willing to be interrupted
(depending on what its doing) is what I was hinting about. I have found this
varies by vendor and client connectivity mechanism FWIW


"Bruce Armstrong [TeamSybase]" <NOCANSPAM_bruce.armstrong@teamsybase.com>

wrote in message news:496d18e6$1@forums-1-dub...
> Actually, I think you missed my point. You implied that a response to the
> cleint was required to implement the DBCancel. My point was that was the
> whole reason for the Async parameter, to allow for the command to be send
> to the database while the request was still processing.
>
> --
> -----------------------------------
>
> My Web 2.0 Stuff
>
> Blog: http://bruce.pbdjmagazine.com/
> Facebook: http://www.facebook.com/people/Bruce-Armstrong/1600223798
> Fotki: http://public.fotki.com/brucearmstrong/
> LinkedIn: http://www.linkedin.com/in/bruceaarmstrong
> Twitter: http://twitter.com/bruce_armstrong
> YouTube: http://www.youtube.com/user/brucearmstrong
> "Chris Pollach" <cpollach@travel-net.com> wrote in message
> news:496cab4b$1@forums-1-dub...
>> Hi Bruce;
>>
>> Another excellent point that I should of made. The interaction between
>> the client and the server is based on how well the DBMS client was
>> written. Since PB's DB driver is really just a hand-shake to actual DB
>> client driver (or middleware) - it will be in the communication
>> implementation techniques used therein that will determine the
>> effectiveness of the DBCancel command. Thus, the effectiveness as you
>> point will often vary by DBMS vendor or connectivity mechanism.
>>
>> Thanks for that comment!
>>
>> --
>> Regards ... Chris
>> ISUG - NA RUG Director
>> http://chrispollach.pbdjmagazine.com
>>
>>
>> "Bruce Armstrong [TeamSybase]" <NOCANSPAM_bruce.armstrong@teamsybase.com>
>> wrote in message news:99apm49397fup3h4pier5qmmrbjvb6cs0o@4ax.com...
>>>
>>> The whole point of enabling Async is so you can send something like a
>>> DBCancel before the database responds to the client. I know it works
>>> for Oracle connections.
>>>
>>> On 13 Jan 2009 05:33:15 -0800, "Chris Pollach"
>>> <cpollach@travel-net.com> wrote:
>>>
>>>> The reason you can do this for an SQL based DWO is that when the DW
>>>> runs
>>>>an SQL statement it actually does allot more than just that one piece of
>>>>SQL. For example in a Select, the DWO object actually issues a Declare,
>>>>Prepare, Execute, Fetch, etc. During these SQL verbs there is a constant
>>>>interaction with the DBMS and thus a chance for your DBCancel to come
>>>>into
>>>>play.
>>>>
>>>> For a SP call, control passes to the SP which can issue many other
>>>> SQL
>>>>statements but they happen on the server. Since no client interaction is
>>>>present during the SP execution the DBCancel is queued to be sent when
>>>>the
>>>>next packet is received from the DB server. In the SP's case, the 1st
>>>>packet
>>>>would contain the 1st set of blocked rows of the result set.
>>>>
>>>> If there is a requirement by the application user to allow the
>>>>transaction in progress to be cancelled - then you either have to stop
>>>>using
>>>>the SP and incorporate the SQL in the DWO (or some combination of DWO's)
>>>>or
>>>>look at multi-threading using the SharedObject approach.
>>>>
>>>>HTH
>>> -----------------------------------
>>>
>>> My Web 2.0 Stuff
>>>
>>> Blog: http://bruce.pbdjmagazine.com/
>>> Facebook: http://www.facebook.com/people/Bruce-Armstrong/1600223798
>>> Fotki: http://public.fotki.com/brucearmstrong/
>>> LinkedIn: http://www.linkedin.com/in/bruceaarmstrong
>>> Twitter: http://twitter.com/bruce_armstrong
>>> YouTube: http://www.youtube.com/user/brucearmstrong
>>
>>
>
>


Bruce Armstrong [TeamSybase] Posted on 2009-01-15 18:02:44.0Z
From: "Bruce Armstrong [TeamSybase]" <NOCANSPAM_bruce.armstrong@teamsybase.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <496c90cb$1@forums-1-dub> <496c981b$1@forums-1-dub> <99apm49397fup3h4pier5qmmrbjvb6cs0o@4ax.com> <496cab4b$1@forums-1-dub> <496d18e6$1@forums-1-dub> <496de507$1@forums-1-dub>
Subject: Re: DBCancel and SP based DW
Lines: 124
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
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: <496f7a44$1@forums-1-dub>
Date: 15 Jan 2009 10:02:44 -0800
X-Trace: forums-1-dub 1232042564 10.22.241.152 (15 Jan 2009 10:02:44 -0800)
X-Original-Trace: 15 Jan 2009 10:02:44 -0800, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88615
Article PK: 417869

Chris,

Either the connection is synchronous or it is asynchronous. It will either
release control to the client after the statement is sent or it won't.
There's really no middle ground. If you've attempted to perform
asynchronous operations and didn't get those results either (a) the database
doesn't support it or (b) you didn't implement it correctly. To indicate
that some implement it "different' is just techno-babble.

--
-----------------------------------

My Web 2.0 Stuff

Blog: http://bruce.pbdjmagazine.com/
Facebook: http://www.facebook.com/people/Bruce-Armstrong/1600223798
Fotki: http://public.fotki.com/brucearmstrong/
LinkedIn: http://www.linkedin.com/in/bruceaarmstrong
Twitter: http://twitter.com/bruce_armstrong
YouTube: http://www.youtube.com/user/brucearmstrong

"Chris Pollach" <cpollach@travel-net.com> wrote in message
news:496de507$1@forums-1-dub...
>
> I agree .. but its how well the DBMS is willing to be interrupted
> (depending on what its doing) is what I was hinting about. I have found
> this varies by vendor and client connectivity mechanism FWIW
>
>
> "Bruce Armstrong [TeamSybase]" <NOCANSPAM_bruce.armstrong@teamsybase.com>
> wrote in message news:496d18e6$1@forums-1-dub...
>> Actually, I think you missed my point. You implied that a response to
>> the cleint was required to implement the DBCancel. My point was that was
>> the whole reason for the Async parameter, to allow for the command to be
>> send to the database while the request was still processing.
>>
>> --
>> -----------------------------------
>>
>> My Web 2.0 Stuff
>>
>> Blog: http://bruce.pbdjmagazine.com/
>> Facebook: http://www.facebook.com/people/Bruce-Armstrong/1600223798
>> Fotki: http://public.fotki.com/brucearmstrong/
>> LinkedIn: http://www.linkedin.com/in/bruceaarmstrong
>> Twitter: http://twitter.com/bruce_armstrong
>> YouTube: http://www.youtube.com/user/brucearmstrong
>> "Chris Pollach" <cpollach@travel-net.com> wrote in message
>> news:496cab4b$1@forums-1-dub...
>>> Hi Bruce;
>>>
>>> Another excellent point that I should of made. The interaction
>>> between the client and the server is based on how well the DBMS client
>>> was written. Since PB's DB driver is really just a hand-shake to actual
>>> DB client driver (or middleware) - it will be in the communication
>>> implementation techniques used therein that will determine the
>>> effectiveness of the DBCancel command. Thus, the effectiveness as you
>>> point will often vary by DBMS vendor or connectivity mechanism.
>>>
>>> Thanks for that comment!
>>>
>>> --
>>> Regards ... Chris
>>> ISUG - NA RUG Director
>>> http://chrispollach.pbdjmagazine.com
>>>
>>>
>>> "Bruce Armstrong [TeamSybase]"
>>> <NOCANSPAM_bruce.armstrong@teamsybase.com> wrote in message
>>> news:99apm49397fup3h4pier5qmmrbjvb6cs0o@4ax.com...
>>>>
>>>> The whole point of enabling Async is so you can send something like a
>>>> DBCancel before the database responds to the client. I know it works
>>>> for Oracle connections.
>>>>
>>>> On 13 Jan 2009 05:33:15 -0800, "Chris Pollach"
>>>> <cpollach@travel-net.com> wrote:
>>>>
>>>>> The reason you can do this for an SQL based DWO is that when the DW
>>>>> runs
>>>>>an SQL statement it actually does allot more than just that one piece
>>>>>of
>>>>>SQL. For example in a Select, the DWO object actually issues a Declare,
>>>>>Prepare, Execute, Fetch, etc. During these SQL verbs there is a
>>>>>constant
>>>>>interaction with the DBMS and thus a chance for your DBCancel to come
>>>>>into
>>>>>play.
>>>>>
>>>>> For a SP call, control passes to the SP which can issue many other
>>>>> SQL
>>>>>statements but they happen on the server. Since no client interaction
>>>>>is
>>>>>present during the SP execution the DBCancel is queued to be sent when
>>>>>the
>>>>>next packet is received from the DB server. In the SP's case, the 1st
>>>>>packet
>>>>>would contain the 1st set of blocked rows of the result set.
>>>>>
>>>>> If there is a requirement by the application user to allow the
>>>>>transaction in progress to be cancelled - then you either have to stop
>>>>>using
>>>>>the SP and incorporate the SQL in the DWO (or some combination of
>>>>>DWO's) or
>>>>>look at multi-threading using the SharedObject approach.
>>>>>
>>>>>HTH
>>>> -----------------------------------
>>>>
>>>> My Web 2.0 Stuff
>>>>
>>>> Blog: http://bruce.pbdjmagazine.com/
>>>> Facebook: http://www.facebook.com/people/Bruce-Armstrong/1600223798
>>>> Fotki: http://public.fotki.com/brucearmstrong/
>>>> LinkedIn: http://www.linkedin.com/in/bruceaarmstrong
>>>> Twitter: http://twitter.com/bruce_armstrong
>>>> YouTube: http://www.youtube.com/user/brucearmstrong
>>>
>>>
>>
>>
>
>


newbie Posted on 2009-01-13 16:07:08.0Z
From: "newbie" <newbie@msdn.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Organization: 193.121.160.69
References: <496c90cb$1@forums-1-dub> <496c981b$1@forums-1-dub> <99apm49397fup3h4pier5qmmrbjvb6cs0o@4ax.com>
X-Newsreader: AspNNTP 1.50 (JodoHost)
Subject: Re: DBCancel and SP based DW
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <496cbc2c$1@forums-1-dub>
Date: 13 Jan 2009 08:07:08 -0800
X-Trace: forums-1-dub 1231862828 10.22.241.152 (13 Jan 2009 08:07:08 -0800)
X-Original-Trace: 13 Jan 2009 08:07:08 -0800, vip152.sybase.com
Lines: 27
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88588
Article PK: 417841

Hi Bruce,
I know it works for Oracle (I mentioned it works for my SQL based DW).
for some reason it just doesn't work for SP based ones.

As mentioned previously I use native connections with PB Enterprise.

I checked trace and it looks like cancel is postponed regardless of the fact
Async is set to 1.

(661fc10): DBPARM=Async=1 (0.000 MS)
(661fc10): PROCEDURE PREPARE:
(661fc10): execute <procename and params>
(661fc10): BIND SELECT OUTPUT BUFFER (DataWindow): (0.360 MS)
..
(661fc10): EXECUTE: (0.000 MS)
(661fc10): FETCH NEXT: (2556.684 MS)
(57d2420): CANCEL: (0.002 MS)

This is shared code on DW control in our framework, the only difference is DW.
Any clues ?

On 13 Jan 2009 06:47:18 -0800,
in sybase.public.powerbuilder.datawindow

Bruce Armstrong [TeamSybase] <NOCANSPAM_bruce.armstrong@teamsybase.com> wrote:
>The whole point of enabling Async is so you can send something like a
>DBCancel before the database responds to the client. I know it works
>for Oracle connections.


Bruce Armstrong [TeamSybase] Posted on 2009-01-15 08:23:27.0Z
From: "Bruce Armstrong [TeamSybase]" <NOCANSPAM_bruce.armstrong@teamsybase.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: DBCancel and SP based DW
Organization: TeamSybase
Reply-To: NOCANSPAM_bruce.armstrong@teamsybase.com
Message-ID: <s2itm4l7v0n5ttiafj52k2uj867c5hrn4s@4ax.com>
References: <496c90cb$1@forums-1-dub> <496c981b$1@forums-1-dub> <99apm49397fup3h4pier5qmmrbjvb6cs0o@4ax.com> <496cbc2c$1@forums-1-dub>
X-Newsreader: Forte Agent 5.00/32.1171
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 15 Jan 2009 00:23:27 -0800
X-Trace: forums-1-dub 1232007807 10.22.241.152 (15 Jan 2009 00:23:27 -0800)
X-Original-Trace: 15 Jan 2009 00:23:27 -0800, vip152.sybase.com
Lines: 52
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88603
Article PK: 417861

Well, I know it works because I've got code in production that uses
it. Perhaps you can show me the code where you actually assign the
DBParm and where you handle the DBCancel.

What we do as well is move the asych process onto a seperate thread
via a shared object. The primary reason for that is because we have
the stored procedure sending messages back down to the client during
processing to update it on the status. So the shared user object
polls for those messages while the procedure is executing and forwards
it back to the main process to let the user know what is going on in
the background.

On 13 Jan 2009 08:07:08 -0800, "newbie" <newbie@msdn.com> wrote:

>Hi Bruce,
>I know it works for Oracle (I mentioned it works for my SQL based DW).
>for some reason it just doesn't work for SP based ones.
>
>As mentioned previously I use native connections with PB Enterprise.
>
>I checked trace and it looks like cancel is postponed regardless of the fact
>Async is set to 1.
>
>(661fc10): DBPARM=Async=1 (0.000 MS)
>(661fc10): PROCEDURE PREPARE:
>(661fc10): execute <procename and params>
>(661fc10): BIND SELECT OUTPUT BUFFER (DataWindow): (0.360 MS)
>..
>(661fc10): EXECUTE: (0.000 MS)
>(661fc10): FETCH NEXT: (2556.684 MS)
>(57d2420): CANCEL: (0.002 MS)
>
>This is shared code on DW control in our framework, the only difference is DW.
>Any clues ?
>
>On 13 Jan 2009 06:47:18 -0800,
> in sybase.public.powerbuilder.datawindow
>Bruce Armstrong [TeamSybase] <NOCANSPAM_bruce.armstrong@teamsybase.com> wrote:
>>The whole point of enabling Async is so you can send something like a
>>DBCancel before the database responds to the client. I know it works
>>for Oracle connections.

-----------------------------------

My Web 2.0 Stuff

Blog: http://bruce.pbdjmagazine.com/
Facebook: http://www.facebook.com/people/Bruce-Armstrong/1600223798
Fotki: http://public.fotki.com/brucearmstrong/
LinkedIn: http://www.linkedin.com/in/bruceaarmstrong
Twitter: http://twitter.com/bruce_armstrong
YouTube: http://www.youtube.com/user/brucearmstrong


newbie Posted on 2009-01-16 11:26:52.0Z
From: "newbie" <newbie@msdn.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Organization: 193.121.160.69
References: <496c90cb$1@forums-1-dub> <496c981b$1@forums-1-dub> <99apm49397fup3h4pier5qmmrbjvb6cs0o@4ax.com> <496cbc2c$1@forums-1-dub> <s2itm4l7v0n5ttiafj52k2uj867c5hrn4s@4ax.com>
X-Newsreader: AspNNTP 1.50 (JodoHost)
Subject: Re: DBCancel and SP based DW
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <49706efc$1@forums-1-dub>
Date: 16 Jan 2009 03:26:52 -0800
X-Trace: forums-1-dub 1232105212 10.22.241.152 (16 Jan 2009 03:26:52 -0800)
X-Original-Trace: 16 Jan 2009 03:26:52 -0800, vip152.sybase.com
Lines: 81
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88619
Article PK: 417874

There it is,

On retriwvestart I check if this control is to be processed in Async mode
If it is,
I change transaction DBParm property to Async=1 (You can see works in log I
attached before), then
I open a popup with cancel button, that can trigger an event ue_dbancel on
dwcontrol (passed to this window).

on dw control ue_dbancel is:
[code]
this.DBCancel( )
this.ib_dbcancel_pending = True
// some code to restore Sync mode
[/code]

Additionally this.ib_dbcancel_pending is used in retrieveRow like
[code]
If ib_dbcancel_pending Then Return 1
[/code]


Close event of this popup has code to restore Sync=0 on transaction object.

As mentioned previously it works for any SQL based DW.

Regards
On 15 Jan 2009 00:23:27 -0800,
in sybase.public.powerbuilder.datawindow

Bruce Armstrong [TeamSybase] <NOCANSPAM_bruce.armstrong@teamsybase.com> wrote:
>Well, I know it works because I've got code in production that uses
>it. Perhaps you can show me the code where you actually assign the
>DBParm and where you handle the DBCancel.
>
>What we do as well is move the asych process onto a seperate thread
>via a shared object. The primary reason for that is because we have
>the stored procedure sending messages back down to the client during
>processing to update it on the status. So the shared user object
>polls for those messages while the procedure is executing and forwards
>it back to the main process to let the user know what is going on in
>the background.
>
>On 13 Jan 2009 08:07:08 -0800, "newbie" <newbie@msdn.com> wrote:
>
>>Hi Bruce,
>>I know it works for Oracle (I mentioned it works for my SQL based DW).
>>for some reason it just doesn't work for SP based ones.
>>
>>As mentioned previously I use native connections with PB Enterprise.
>>
>>I checked trace and it looks like cancel is postponed regardless of the fact
>>Async is set to 1.
>>
>>(661fc10): DBPARM=Async=1 (0.000 MS)
>>(661fc10): PROCEDURE PREPARE:
>>(661fc10): execute <procename and params>
>>(661fc10): BIND SELECT OUTPUT BUFFER (DataWindow): (0.360 MS)
>>..
>>(661fc10): EXECUTE: (0.000 MS)
>>(661fc10): FETCH NEXT: (2556.684 MS)
>>(57d2420): CANCEL: (0.002 MS)
>>
>>This is shared code on DW control in our framework, the only difference is DW.
>>Any clues ?
>>
>>On 13 Jan 2009 06:47:18 -0800,
>> in sybase.public.powerbuilder.datawindow
>>Bruce Armstrong [TeamSybase] <NOCANSPAM_bruce.armstrong@teamsybase.com> wrote:
>>>The whole point of enabling Async is so you can send something like a
>>>DBCancel before the database responds to the client. I know it works
>>>for Oracle connections.
>-----------------------------------
>
>My Web 2.0 Stuff
>
>Blog: http://bruce.pbdjmagazine.com/
>Facebook: http://www.facebook.com/people/Bruce-Armstrong/1600223798
>Fotki: http://public.fotki.com/brucearmstrong/
>LinkedIn: http://www.linkedin.com/in/bruceaarmstrong
>Twitter: http://twitter.com/bruce_armstrong
>YouTube: http://www.youtube.com/user/brucearmstrong


Bruce Armstrong [TeamSybase] Posted on 2009-01-16 15:37:21.0Z
From: "Bruce Armstrong [TeamSybase]" <NOCANSPAM_bruce.armstrong@teamsybase.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: DBCancel and SP based DW
Organization: TeamSybase
Reply-To: NOCANSPAM_bruce.armstrong@teamsybase.com
Message-ID: <e791n4hqmjgl0806c31ah5agfrbrh3f9qk@4ax.com>
References: <496c90cb$1@forums-1-dub> <496c981b$1@forums-1-dub> <99apm49397fup3h4pier5qmmrbjvb6cs0o@4ax.com> <496cbc2c$1@forums-1-dub> <s2itm4l7v0n5ttiafj52k2uj867c5hrn4s@4ax.com> <49706efc$1@forums-1-dub>
X-Newsreader: Forte Agent 5.00/32.1171
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 16 Jan 2009 07:37:21 -0800
X-Trace: forums-1-dub 1232120241 10.22.241.152 (16 Jan 2009 07:37:21 -0800)
X-Original-Trace: 16 Jan 2009 07:37:21 -0800, vip152.sybase.com
Lines: 105
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88621
Article PK: 417875

Try moving the place where you set the Async=1 to before you issue the
retrieve statement rather than in the retrivestart event.

Just to be clear, *any* transaction, async or not, will allow you
cancel the retrieve through the retrieverow event. The only thing
that the Async adds is the ability to cancel the retrieve before the
first row comes back. It's possible that your attempts with SQL based
datawindows aren't working either (as async that is) but you're not
getting the delay on the initial retrieve that would show you that was
occurring.

On 16 Jan 2009 03:26:52 -0800, "newbie" <newbie@msdn.com> wrote:

>There it is,
>
>On retriwvestart I check if this control is to be processed in Async mode
>If it is,
>I change transaction DBParm property to Async=1 (You can see works in log I
>attached before), then
>I open a popup with cancel button, that can trigger an event ue_dbancel on
>dwcontrol (passed to this window).
>
>on dw control ue_dbancel is:
>[code]
>this.DBCancel( )
>this.ib_dbcancel_pending = True
>// some code to restore Sync mode
>[/code]
>
>Additionally this.ib_dbcancel_pending is used in retrieveRow like
>[code]
>If ib_dbcancel_pending Then Return 1
>[/code]
>
>
>Close event of this popup has code to restore Sync=0 on transaction object.
>
>As mentioned previously it works for any SQL based DW.
>
>Regards
>On 15 Jan 2009 00:23:27 -0800,
> in sybase.public.powerbuilder.datawindow
>Bruce Armstrong [TeamSybase] <NOCANSPAM_bruce.armstrong@teamsybase.com> wrote:
>>Well, I know it works because I've got code in production that uses
>>it. Perhaps you can show me the code where you actually assign the
>>DBParm and where you handle the DBCancel.
>>
>>What we do as well is move the asych process onto a seperate thread
>>via a shared object. The primary reason for that is because we have
>>the stored procedure sending messages back down to the client during
>>processing to update it on the status. So the shared user object
>>polls for those messages while the procedure is executing and forwards
>>it back to the main process to let the user know what is going on in
>>the background.
>>
>>On 13 Jan 2009 08:07:08 -0800, "newbie" <newbie@msdn.com> wrote:
>>
>>>Hi Bruce,
>>>I know it works for Oracle (I mentioned it works for my SQL based DW).
>>>for some reason it just doesn't work for SP based ones.
>>>
>>>As mentioned previously I use native connections with PB Enterprise.
>>>
>>>I checked trace and it looks like cancel is postponed regardless of the fact
>>>Async is set to 1.
>>>
>>>(661fc10): DBPARM=Async=1 (0.000 MS)
>>>(661fc10): PROCEDURE PREPARE:
>>>(661fc10): execute <procename and params>
>>>(661fc10): BIND SELECT OUTPUT BUFFER (DataWindow): (0.360 MS)
>>>..
>>>(661fc10): EXECUTE: (0.000 MS)
>>>(661fc10): FETCH NEXT: (2556.684 MS)
>>>(57d2420): CANCEL: (0.002 MS)
>>>
>>>This is shared code on DW control in our framework, the only difference is DW.
>>>Any clues ?
>>>
>>>On 13 Jan 2009 06:47:18 -0800,
>>> in sybase.public.powerbuilder.datawindow
>>>Bruce Armstrong [TeamSybase] <NOCANSPAM_bruce.armstrong@teamsybase.com> wrote:
>>>>The whole point of enabling Async is so you can send something like a
>>>>DBCancel before the database responds to the client. I know it works
>>>>for Oracle connections.
>>-----------------------------------
>>
>>My Web 2.0 Stuff
>>
>>Blog: http://bruce.pbdjmagazine.com/
>>Facebook: http://www.facebook.com/people/Bruce-Armstrong/1600223798
>>Fotki: http://public.fotki.com/brucearmstrong/
>>LinkedIn: http://www.linkedin.com/in/bruceaarmstrong
>>Twitter: http://twitter.com/bruce_armstrong
>>YouTube: http://www.youtube.com/user/brucearmstrong

-----------------------------------

My Web 2.0 Stuff

Blog: http://bruce.pbdjmagazine.com/
Facebook: http://www.facebook.com/people/Bruce-Armstrong/1600223798
Fotki: http://public.fotki.com/brucearmstrong/
LinkedIn: http://www.linkedin.com/in/bruceaarmstrong
Twitter: http://twitter.com/bruce_armstrong
YouTube: http://www.youtube.com/user/brucearmstrong


newbie Posted on 2009-01-16 16:09:16.0Z
From: "newbie" <newbie@msn.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Organization: 94.140.186.212
References: <496c90cb$1@forums-1-dub> <496c981b$1@forums-1-dub> <99apm49397fup3h4pier5qmmrbjvb6cs0o@4ax.com> <496cbc2c$1@forums-1-dub> <s2itm4l7v0n5ttiafj52k2uj867c5hrn4s@4ax.com> <49706efc$1@forums-1-dub> <e791n4hqmjgl0806c31ah5agfrbrh3f9qk@4ax.com>
X-Newsreader: AspNNTP 1.50 (JodoHost)
Subject: Re: DBCancel and SP based DW
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4970b12c$1@forums-1-dub>
Date: 16 Jan 2009 08:09:16 -0800
X-Trace: forums-1-dub 1232122156 10.22.241.152 (16 Jan 2009 08:09:16 -0800)
X-Original-Trace: 16 Jan 2009 08:09:16 -0800, vip152.sybase.com
Lines: 121
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88623
Article PK: 417877

Thanks,
Actually I cannot move it to anything before retrievestart and keep it generic.

Logs shows me that Async is set to 1 for SP as well, but I have to wait till 1st
record to get retrieval canceled.

For SQL based DW the same code works perfectly, and believe me those reports
might take minutes to get any rows from DB but I can cancel the retrieval
almost immediately - .5 to 1 sec.



On 16 Jan 2009 07:37:21 -0800,
in sybase.public.powerbuilder.datawindow

Bruce Armstrong [TeamSybase] <NOCANSPAM_bruce.armstrong@teamsybase.com> wrote:
>Try moving the place where you set the Async=1 to before you issue the
>retrieve statement rather than in the retrivestart event.
>
>Just to be clear, *any* transaction, async or not, will allow you
>cancel the retrieve through the retrieverow event. The only thing
>that the Async adds is the ability to cancel the retrieve before the
>first row comes back. It's possible that your attempts with SQL based
>datawindows aren't working either (as async that is) but you're not
>getting the delay on the initial retrieve that would show you that was
>occurring.
>
>On 16 Jan 2009 03:26:52 -0800, "newbie" <newbie@msdn.com> wrote:
>
>>There it is,
>>
>>On retriwvestart I check if this control is to be processed in Async mode
>>If it is,
>>I change transaction DBParm property to Async=1 (You can see works in log I
>>attached before), then
>>I open a popup with cancel button, that can trigger an event ue_dbancel on
>>dwcontrol (passed to this window).
>>
>>on dw control ue_dbancel is:
>>[code]
>>this.DBCancel( )
>>this.ib_dbcancel_pending = True
>>// some code to restore Sync mode
>>[/code]
>>
>>Additionally this.ib_dbcancel_pending is used in retrieveRow like
>>[code]
>>If ib_dbcancel_pending Then Return 1
>>[/code]
>>
>>
>>Close event of this popup has code to restore Sync=0 on transaction object.
>>
>>As mentioned previously it works for any SQL based DW.
>>
>>Regards
>>On 15 Jan 2009 00:23:27 -0800,
>> in sybase.public.powerbuilder.datawindow
>>Bruce Armstrong [TeamSybase] <NOCANSPAM_bruce.armstrong@teamsybase.com> wrote:
>>>Well, I know it works because I've got code in production that uses
>>>it. Perhaps you can show me the code where you actually assign the
>>>DBParm and where you handle the DBCancel.
>>>
>>>What we do as well is move the asych process onto a seperate thread
>>>via a shared object. The primary reason for that is because we have
>>>the stored procedure sending messages back down to the client during
>>>processing to update it on the status. So the shared user object
>>>polls for those messages while the procedure is executing and forwards
>>>it back to the main process to let the user know what is going on in
>>>the background.
>>>
>>>On 13 Jan 2009 08:07:08 -0800, "newbie" <newbie@msdn.com> wrote:
>>>
>>>>Hi Bruce,
>>>>I know it works for Oracle (I mentioned it works for my SQL based DW).
>>>>for some reason it just doesn't work for SP based ones.
>>>>
>>>>As mentioned previously I use native connections with PB Enterprise.
>>>>
>>>>I checked trace and it looks like cancel is postponed regardless of the fact
>>>>Async is set to 1.
>>>>
>>>>(661fc10): DBPARM=Async=1 (0.000 MS)
>>>>(661fc10): PROCEDURE PREPARE:
>>>>(661fc10): execute <procename and params>
>>>>(661fc10): BIND SELECT OUTPUT BUFFER (DataWindow): (0.360 MS)
>>>>..
>>>>(661fc10): EXECUTE: (0.000 MS)
>>>>(661fc10): FETCH NEXT: (2556.684 MS)
>>>>(57d2420): CANCEL: (0.002 MS)
>>>>
>>>>This is shared code on DW control in our framework, the only difference is
DW.
>>>>Any clues ?
>>>>
>>>>On 13 Jan 2009 06:47:18 -0800,
>>>> in sybase.public.powerbuilder.datawindow
>>>>Bruce Armstrong [TeamSybase] <NOCANSPAM_bruce.armstrong@teamsybase.com>
wrote:
>>>>>The whole point of enabling Async is so you can send something like a
>>>>>DBCancel before the database responds to the client. I know it works
>>>>>for Oracle connections.
>>>-----------------------------------
>>>
>>>My Web 2.0 Stuff
>>>
>>>Blog: http://bruce.pbdjmagazine.com/
>>>Facebook: http://www.facebook.com/people/Bruce-Armstrong/1600223798
>>>Fotki: http://public.fotki.com/brucearmstrong/
>>>LinkedIn: http://www.linkedin.com/in/bruceaarmstrong
>>>Twitter: http://twitter.com/bruce_armstrong
>>>YouTube: http://www.youtube.com/user/brucearmstrong
>-----------------------------------
>
>My Web 2.0 Stuff
>
>Blog: http://bruce.pbdjmagazine.com/
>Facebook: http://www.facebook.com/people/Bruce-Armstrong/1600223798
>Fotki: http://public.fotki.com/brucearmstrong/
>LinkedIn: http://www.linkedin.com/in/bruceaarmstrong
>Twitter: http://twitter.com/bruce_armstrong
>YouTube: http://www.youtube.com/user/brucearmstrong


Bruce Armstrong [TeamSybase] Posted on 2009-01-16 16:33:24.0Z
From: "Bruce Armstrong [TeamSybase]" <NOCANSPAM_bruce.armstrong@teamsybase.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: DBCancel and SP based DW
Organization: TeamSybase
Reply-To: NOCANSPAM_bruce.armstrong@teamsybase.com
Message-ID: <jkd1n45hfq5l3ag4kvh0le8i3ugbvadj5k@4ax.com>
References: <496c90cb$1@forums-1-dub> <496c981b$1@forums-1-dub> <99apm49397fup3h4pier5qmmrbjvb6cs0o@4ax.com> <496cbc2c$1@forums-1-dub> <s2itm4l7v0n5ttiafj52k2uj867c5hrn4s@4ax.com> <49706efc$1@forums-1-dub> <e791n4hqmjgl0806c31ah5agfrbrh3f9qk@4ax.com> <4970b12c$1@forums-1-dub>
X-Newsreader: Forte Agent 5.00/32.1171
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 16 Jan 2009 08:33:24 -0800
X-Trace: forums-1-dub 1232123604 10.22.241.152 (16 Jan 2009 08:33:24 -0800)
X-Original-Trace: 16 Jan 2009 08:33:24 -0800, vip152.sybase.com
Lines: 137
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88624
Article PK: 417878

I don't know what to tell you at this point. What I know is that if
you do it before the retrieve is even issued, it works.

On 16 Jan 2009 08:09:16 -0800, "newbie" <newbie@msn.com> wrote:

>Thanks,
>Actually I cannot move it to anything before retrievestart and keep it generic.
>
>Logs shows me that Async is set to 1 for SP as well, but I have to wait till 1st
>record to get retrieval canceled.
>
>For SQL based DW the same code works perfectly, and believe me those reports
>might take minutes to get any rows from DB but I can cancel the retrieval
>almost immediately - .5 to 1 sec.
>
>
>
>On 16 Jan 2009 07:37:21 -0800,
> in sybase.public.powerbuilder.datawindow
>Bruce Armstrong [TeamSybase] <NOCANSPAM_bruce.armstrong@teamsybase.com> wrote:
>>Try moving the place where you set the Async=1 to before you issue the
>>retrieve statement rather than in the retrivestart event.
>>
>>Just to be clear, *any* transaction, async or not, will allow you
>>cancel the retrieve through the retrieverow event. The only thing
>>that the Async adds is the ability to cancel the retrieve before the
>>first row comes back. It's possible that your attempts with SQL based
>>datawindows aren't working either (as async that is) but you're not
>>getting the delay on the initial retrieve that would show you that was
>>occurring.
>>
>>On 16 Jan 2009 03:26:52 -0800, "newbie" <newbie@msdn.com> wrote:
>>
>>>There it is,
>>>
>>>On retriwvestart I check if this control is to be processed in Async mode
>>>If it is,
>>>I change transaction DBParm property to Async=1 (You can see works in log I
>>>attached before), then
>>>I open a popup with cancel button, that can trigger an event ue_dbancel on
>>>dwcontrol (passed to this window).
>>>
>>>on dw control ue_dbancel is:
>>>[code]
>>>this.DBCancel( )
>>>this.ib_dbcancel_pending = True
>>>// some code to restore Sync mode
>>>[/code]
>>>
>>>Additionally this.ib_dbcancel_pending is used in retrieveRow like
>>>[code]
>>>If ib_dbcancel_pending Then Return 1
>>>[/code]
>>>
>>>
>>>Close event of this popup has code to restore Sync=0 on transaction object.
>>>
>>>As mentioned previously it works for any SQL based DW.
>>>
>>>Regards
>>>On 15 Jan 2009 00:23:27 -0800,
>>> in sybase.public.powerbuilder.datawindow
>>>Bruce Armstrong [TeamSybase] <NOCANSPAM_bruce.armstrong@teamsybase.com> wrote:
>>>>Well, I know it works because I've got code in production that uses
>>>>it. Perhaps you can show me the code where you actually assign the
>>>>DBParm and where you handle the DBCancel.
>>>>
>>>>What we do as well is move the asych process onto a seperate thread
>>>>via a shared object. The primary reason for that is because we have
>>>>the stored procedure sending messages back down to the client during
>>>>processing to update it on the status. So the shared user object
>>>>polls for those messages while the procedure is executing and forwards
>>>>it back to the main process to let the user know what is going on in
>>>>the background.
>>>>
>>>>On 13 Jan 2009 08:07:08 -0800, "newbie" <newbie@msdn.com> wrote:
>>>>
>>>>>Hi Bruce,
>>>>>I know it works for Oracle (I mentioned it works for my SQL based DW).
>>>>>for some reason it just doesn't work for SP based ones.
>>>>>
>>>>>As mentioned previously I use native connections with PB Enterprise.
>>>>>
>>>>>I checked trace and it looks like cancel is postponed regardless of the fact
>>>>>Async is set to 1.
>>>>>
>>>>>(661fc10): DBPARM=Async=1 (0.000 MS)
>>>>>(661fc10): PROCEDURE PREPARE:
>>>>>(661fc10): execute <procename and params>
>>>>>(661fc10): BIND SELECT OUTPUT BUFFER (DataWindow): (0.360 MS)
>>>>>..
>>>>>(661fc10): EXECUTE: (0.000 MS)
>>>>>(661fc10): FETCH NEXT: (2556.684 MS)
>>>>>(57d2420): CANCEL: (0.002 MS)
>>>>>
>>>>>This is shared code on DW control in our framework, the only difference is
>DW.
>>>>>Any clues ?
>>>>>
>>>>>On 13 Jan 2009 06:47:18 -0800,
>>>>> in sybase.public.powerbuilder.datawindow
>>>>>Bruce Armstrong [TeamSybase] <NOCANSPAM_bruce.armstrong@teamsybase.com>
>wrote:
>>>>>>The whole point of enabling Async is so you can send something like a
>>>>>>DBCancel before the database responds to the client. I know it works
>>>>>>for Oracle connections.
>>>>-----------------------------------
>>>>
>>>>My Web 2.0 Stuff
>>>>
>>>>Blog: http://bruce.pbdjmagazine.com/
>>>>Facebook: http://www.facebook.com/people/Bruce-Armstrong/1600223798
>>>>Fotki: http://public.fotki.com/brucearmstrong/
>>>>LinkedIn: http://www.linkedin.com/in/bruceaarmstrong
>>>>Twitter: http://twitter.com/bruce_armstrong
>>>>YouTube: http://www.youtube.com/user/brucearmstrong
>>-----------------------------------
>>
>>My Web 2.0 Stuff
>>
>>Blog: http://bruce.pbdjmagazine.com/
>>Facebook: http://www.facebook.com/people/Bruce-Armstrong/1600223798
>>Fotki: http://public.fotki.com/brucearmstrong/
>>LinkedIn: http://www.linkedin.com/in/bruceaarmstrong
>>Twitter: http://twitter.com/bruce_armstrong
>>YouTube: http://www.youtube.com/user/brucearmstrong

-----------------------------------

My Web 2.0 Stuff

Blog: http://bruce.pbdjmagazine.com/
Facebook: http://www.facebook.com/people/Bruce-Armstrong/1600223798
Fotki: http://public.fotki.com/brucearmstrong/
LinkedIn: http://www.linkedin.com/in/bruceaarmstrong
Twitter: http://twitter.com/bruce_armstrong
YouTube: http://www.youtube.com/user/brucearmstrong


Chris Werner Posted on 2009-01-16 16:52:26.0Z
From: "Chris Werner" <cwAT{PleaseNoSpam}f-s.de>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <496c90cb$1@forums-1-dub> <496c981b$1@forums-1-dub> <99apm49397fup3h4pier5qmmrbjvb6cs0o@4ax.com> <496cbc2c$1@forums-1-dub> <s2itm4l7v0n5ttiafj52k2uj867c5hrn4s@4ax.com> <49706efc$1@forums-1-dub> <e791n4hqmjgl0806c31ah5agfrbrh3f9qk@4ax.com> <4970b12c$1@forums-1-dub>
Subject: Re: DBCancel and SP based DW
Lines: 145
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
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: <4970bb4a$1@forums-1-dub>
Date: 16 Jan 2009 08:52:26 -0800
X-Trace: forums-1-dub 1232124746 10.22.241.152 (16 Jan 2009 08:52:26 -0800)
X-Original-Trace: 16 Jan 2009 08:52:26 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88625
Article PK: 417879

Hi,

maybe overriding the setTransObject() method of your general
DataWindow/DataStore
and move it there (followed by a call to super::setTransObject()) would help
you to keep it generic.

Chris Werner
f+s software gmbh

"newbie" <newbie@msn.com> schrieb im Newsbeitrag
news:4970b12c$1@forums-1-dub...

> Thanks,
> Actually I cannot move it to anything before retrievestart and keep it
> generic.
>
> Logs shows me that Async is set to 1 for SP as well, but I have to wait
> till 1st
> record to get retrieval canceled.
>
> For SQL based DW the same code works perfectly, and believe me those
> reports
> might take minutes to get any rows from DB but I can cancel the retrieval
> almost immediately - .5 to 1 sec.
>
>
>
> On 16 Jan 2009 07:37:21 -0800,
> in sybase.public.powerbuilder.datawindow
> Bruce Armstrong [TeamSybase] <NOCANSPAM_bruce.armstrong@teamsybase.com>
> wrote:
>>Try moving the place where you set the Async=1 to before you issue the
>>retrieve statement rather than in the retrivestart event.
>>
>>Just to be clear, *any* transaction, async or not, will allow you
>>cancel the retrieve through the retrieverow event. The only thing
>>that the Async adds is the ability to cancel the retrieve before the
>>first row comes back. It's possible that your attempts with SQL based
>>datawindows aren't working either (as async that is) but you're not
>>getting the delay on the initial retrieve that would show you that was
>>occurring.
>>
>>On 16 Jan 2009 03:26:52 -0800, "newbie" <newbie@msdn.com> wrote:
>>
>>>There it is,
>>>
>>>On retriwvestart I check if this control is to be processed in Async mode
>>>If it is,
>>>I change transaction DBParm property to Async=1 (You can see works in log
>>>I
>>>attached before), then
>>>I open a popup with cancel button, that can trigger an event ue_dbancel
>>>on
>>>dwcontrol (passed to this window).
>>>
>>>on dw control ue_dbancel is:
>>>[code]
>>>this.DBCancel( )
>>>this.ib_dbcancel_pending = True
>>>// some code to restore Sync mode
>>>[/code]
>>>
>>>Additionally this.ib_dbcancel_pending is used in retrieveRow like
>>>[code]
>>>If ib_dbcancel_pending Then Return 1
>>>[/code]
>>>
>>>
>>>Close event of this popup has code to restore Sync=0 on transaction
>>>object.
>>>
>>>As mentioned previously it works for any SQL based DW.
>>>
>>>Regards
>>>On 15 Jan 2009 00:23:27 -0800,
>>> in sybase.public.powerbuilder.datawindow
>>>Bruce Armstrong [TeamSybase] <NOCANSPAM_bruce.armstrong@teamsybase.com>
>>>wrote:
>>>>Well, I know it works because I've got code in production that uses
>>>>it. Perhaps you can show me the code where you actually assign the
>>>>DBParm and where you handle the DBCancel.
>>>>
>>>>What we do as well is move the asych process onto a seperate thread
>>>>via a shared object. The primary reason for that is because we have
>>>>the stored procedure sending messages back down to the client during
>>>>processing to update it on the status. So the shared user object
>>>>polls for those messages while the procedure is executing and forwards
>>>>it back to the main process to let the user know what is going on in
>>>>the background.
>>>>
>>>>On 13 Jan 2009 08:07:08 -0800, "newbie" <newbie@msdn.com> wrote:
>>>>
>>>>>Hi Bruce,
>>>>>I know it works for Oracle (I mentioned it works for my SQL based DW).
>>>>>for some reason it just doesn't work for SP based ones.
>>>>>
>>>>>As mentioned previously I use native connections with PB Enterprise.
>>>>>
>>>>>I checked trace and it looks like cancel is postponed regardless of the
>>>>>fact
>>>>>Async is set to 1.
>>>>>
>>>>>(661fc10): DBPARM=Async=1 (0.000 MS)
>>>>>(661fc10): PROCEDURE PREPARE:
>>>>>(661fc10): execute <procename and params>
>>>>>(661fc10): BIND SELECT OUTPUT BUFFER (DataWindow): (0.360 MS)
>>>>>..
>>>>>(661fc10): EXECUTE: (0.000 MS)
>>>>>(661fc10): FETCH NEXT: (2556.684 MS)
>>>>>(57d2420): CANCEL: (0.002 MS)
>>>>>
>>>>>This is shared code on DW control in our framework, the only difference
>>>>>is
> DW.
>>>>>Any clues ?
>>>>>
>>>>>On 13 Jan 2009 06:47:18 -0800,
>>>>> in sybase.public.powerbuilder.datawindow
>>>>>Bruce Armstrong [TeamSybase] <NOCANSPAM_bruce.armstrong@teamsybase.com>
> wrote:
>>>>>>The whole point of enabling Async is so you can send something like a
>>>>>>DBCancel before the database responds to the client. I know it works
>>>>>>for Oracle connections.
>>>>-----------------------------------
>>>>
>>>>My Web 2.0 Stuff
>>>>
>>>>Blog: http://bruce.pbdjmagazine.com/
>>>>Facebook: http://www.facebook.com/people/Bruce-Armstrong/1600223798
>>>>Fotki: http://public.fotki.com/brucearmstrong/
>>>>LinkedIn: http://www.linkedin.com/in/bruceaarmstrong
>>>>Twitter: http://twitter.com/bruce_armstrong
>>>>YouTube: http://www.youtube.com/user/brucearmstrong
>>-----------------------------------
>>
>>My Web 2.0 Stuff
>>
>>Blog: http://bruce.pbdjmagazine.com/
>>Facebook: http://www.facebook.com/people/Bruce-Armstrong/1600223798
>>Fotki: http://public.fotki.com/brucearmstrong/
>>LinkedIn: http://www.linkedin.com/in/bruceaarmstrong
>>Twitter: http://twitter.com/bruce_armstrong
>>YouTube: http://www.youtube.com/user/brucearmstrong


Herbert Putteneers Posted on 2009-03-19 23:20:36.0Z
From: "Herbert Putteneers" <herbert@ipc.be>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <496c90cb$1@forums-1-dub>
Subject: Re: DBCancel and SP based DW
Lines: 64
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
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: <49c2d344$1@forums-1-dub>
Date: 19 Mar 2009 15:20:36 -0800
X-Trace: forums-1-dub 1237504836 10.22.241.152 (19 Mar 2009 15:20:36 -0800)
X-Original-Trace: 19 Mar 2009 15:20:36 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89014
Article PK: 418270

We have been bitten by the same problem.

My first two observations are the same as those from "newbie". Async is on.
dbcancel Cancels the retrieve when the datawindow source is a sql statement
before the first row is retrieved.
Wrap the same query in a stored procedure, modify the dw source to use that
stored procedure, and the dbcancel cancels the retrieve only after the first
row is retrieved.

Bruce Armstrong suggests that this is most likely due to the async not being
set on time. My tests show that this is not the reason: even when setting
the async at connect time, the stored procedure datawindow refuses to have
its retrieve canceled before the first row is returned.

Chris Pollach answers that a retrieve is a complex interaction between the
datawindow object, the PB DB driver and the actual DB client driver, at
least as far as we are talking about a sql source dw. When the source is a
stored procedure however, none of this interaction takes place, all is
handled by the stored procedure, no interaction is present during the SP
execution, and the dbcancel is only sent when communication is resumed -
which is when the first row is received. His final message points the finger
at "... how well the DBMS is willing to be interrupted..." and, in a prior
message, "The interaction between the client and the server is based on how
well the DBMS client was written".

This seemed like a possibility, until I made my third observation.
When you have a datawindow with a sql source, with dbcancel working
perfectly - i.e. canceling the retrieve before the first row is returned,
and then you turn on "retrieve as needed", all of a sudden the dbcancel will
only cancel the retrieve after the first row is returned.

Chris Pollack writes "Since PB's DB driver is really just a hand-shake to
actual DB client driver (or middleware) - it will be in the communication
implementation techniques used therein that will determine the effectiveness
of the DBCancel command."

It now seems much more likely that the real problem here is in either PB's
DB driver or in the interaction between the DWO and the PB DB driver, rather
than in the actual client driver. I would call this a bug.

Kind regards,

Herbert Putteneers

"newbie" <newbie@msdn.com> wrote in message news:496c90cb$1@forums-1-dub...
> Hi,
> I'm setting Async mode, everything works fine (I can cancel retrieval
> before
> first row "arrives") while I'm using SQL based DW.
>
> When I try to do the same with SP based DW I have to wait for first row to
> get
> DBCancel() processed. Is it how it should work ?
>
> Env :
> XP Prof SP3,
> PB 10.5.1 b 6551 (I know it's old) Ent.
> DB - 10.2.0.3.0 Enterprise
> Native connection
> ---== Posted via the PFCGuide Web Newsreader ==---
> http://www.pfcguide.com/_newsgroups/group_list.asp