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.

Multitable Update behavior change?

7 posts in DataWindow Last posting was on 2009-03-17 17:54:26.0Z
mhampton Posted on 2009-03-12 18:55:40.0Z
From: mhampton <mdhampton@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Multitable Update behavior change?
Date: Thu, 12 Mar 2009 11:55:40 -0700 (PDT)
Organization: http://groups.google.com
Lines: 13
Message-ID: <15125af5-3643-4fcc-823a-1a0a37096536@y13g2000yqn.googlegroups.com>
NNTP-Posting-Host: 70.62.223.68
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1236884140 32272 127.0.0.1 (12 Mar 2009 18:55:40 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 12 Mar 2009 18:55:40 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: y13g2000yqn.googlegroups.com; posting-host=70.62.223.68; posting-account=1slC8woAAAA_hCZuBpZhfWINwjNAZy9w
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7 (.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!postnews.google.com!y13g2000yqn.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88954
Article PK: 418205

Prior to PB 10.5, we used the "loop through and modify the datawindow
for each table you need to update" method (like PFC) to have a
datawindow update multiple tables. We set
Datawindow.Table.UpdateTable=2. However, the only column that gets put
in the where clause is the primary key. I manually edited the
datawindow source to set the updatewhereclause=yes in the datawindow
source, and it added the columns back in, but it also added modified
columns from other tables.

Prior to PB 10.5, we were able to set the
Datawindow.Table.UpdateTable=2 and it would work as expected.

Has anyone else noticed this?


mhampton Posted on 2009-03-12 21:12:21.0Z
From: mhampton <mdhampton@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Multitable Update behavior change?
Date: Thu, 12 Mar 2009 14:12:21 -0700 (PDT)
Organization: http://groups.google.com
Lines: 27
Message-ID: <73124780-7846-4542-b1d6-db0781476c7f@y13g2000yqn.googlegroups.com>
References: <15125af5-3643-4fcc-823a-1a0a37096536@y13g2000yqn.googlegroups.com>
NNTP-Posting-Host: 70.62.223.68
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1236892341 26329 127.0.0.1 (12 Mar 2009 21:12:21 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 12 Mar 2009 21:12:21 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: y13g2000yqn.googlegroups.com; posting-host=70.62.223.68; posting-account=1slC8woAAAA_hCZuBpZhfWINwjNAZy9w
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7 (.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!newsfeed.yul.equant.net!news-out.readnews.com!transit4.readnews.com!postnews.google.com!y13g2000yqn.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88956
Article PK: 418204

OK, more information. This is a multitable update on a stored
procedure based datawindow. We were using
Datawindow.Table.UpdateTable=1. The behavior change is with the
updatewhereclause=no in the datawindow source. In PB 7.x, it seemed to
ignore updatewhereclause=no (all of our colummns were marked with
this). I manually edited the source code and changed all
updatewhereclause=no to updatewhereclause=yes, and our code started
working.

So, if updatewhereclause is so important to update syntax generation,
why isn't it included as a modifiable datawindow attribute?

On Mar 12, 2:55 pm, mhampton <mdhamp...@gmail.com> wrote:
> Prior to PB 10.5, we used the "loop through and modify the datawindow
> for each table you need to update" method (like PFC) to have a
> datawindow update multiple tables. We set
> Datawindow.Table.UpdateTable=2. However, the only column that gets put
> in the where clause is the primary key. I manually edited the
> datawindow source to set the updatewhereclause=yes in the datawindow
> source, and it added the columns back in, but it also added modified
> columns from other tables.
>
> Prior to PB 10.5, we were able to set the
> Datawindow.Table.UpdateTable=2 and it would work as expected.
>
> Has anyone else noticed this?


Roland Smith [TeamSybase] Posted on 2009-03-13 19:19:53.0Z
From: "Roland Smith [TeamSybase]" <rsmith_at_trusthss_dot_com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <15125af5-3643-4fcc-823a-1a0a37096536@y13g2000yqn.googlegroups.com>
Subject: Re: Multitable Update behavior change?
Lines: 24
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <49bab1d9$1@forums-1-dub>
Date: 13 Mar 2009 11:19:53 -0800
X-Trace: forums-1-dub 1236971993 10.22.241.152 (13 Mar 2009 11:19:53 -0800)
X-Original-Trace: 13 Mar 2009 11:19:53 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88959
Article PK: 418209

According to the help file, Datawindow.Table.UpdateTable is:

"A string specifying the name of the database table used to build the Update
syntax."

So how you got it to work by specifying a number is beyond me.

"mhampton" <mdhampton@gmail.com> wrote in message
news:15125af5-3643-4fcc-823a-1a0a37096536@y13g2000yqn.googlegroups.com...
> Prior to PB 10.5, we used the "loop through and modify the datawindow
> for each table you need to update" method (like PFC) to have a
> datawindow update multiple tables. We set
> Datawindow.Table.UpdateTable=2. However, the only column that gets put
> in the where clause is the primary key. I manually edited the
> datawindow source to set the updatewhereclause=yes in the datawindow
> source, and it added the columns back in, but it also added modified
> columns from other tables.
>
> Prior to PB 10.5, we were able to set the
> Datawindow.Table.UpdateTable=2 and it would work as expected.
>
> Has anyone else noticed this?


mhampton Posted on 2009-03-16 18:33:59.0Z
From: mhampton <mdhampton@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Multitable Update behavior change?
Date: Mon, 16 Mar 2009 11:33:59 -0700 (PDT)
Organization: http://groups.google.com
Lines: 47
Message-ID: <33ba2fc0-f688-426c-87f4-3615b9e88718@d19g2000yqb.googlegroups.com>
References: <15125af5-3643-4fcc-823a-1a0a37096536@y13g2000yqn.googlegroups.com> <49bab1d9$1@forums-1-dub>
NNTP-Posting-Host: 70.62.223.68
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1237228439 24067 127.0.0.1 (16 Mar 2009 18:33:59 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 16 Mar 2009 18:33:59 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: d19g2000yqb.googlegroups.com; posting-host=70.62.223.68; posting-account=1slC8woAAAA_hCZuBpZhfWINwjNAZy9w
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7 (.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!newsfeed.yul.equant.net!nntp1.roc.gblx.net!nntp.gblx.net!nntp.gblx.net!nlpi057.nbdc.sbc.com!prodigy.net!news.glorb.com!news2.glorb.com!postnews.google.com!d19g2000yqb.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88967
Article PK: 418217

Sorry -- Table.UpdateWhere=2 (we replace UpdateTable with the table
name to update).

It appears that somehow all of our columns got set with
updatwhereclause=no. I changed all of these to updatewhereclause=yes
and then Table.UpdateWhere=1 now worked as expected. However, it I
tried to set Table.UpdateWhere=2 then all modified columns would be
appended to the where clause, whether or not the columns are actually
in Table.UpdateTable.

It would be nice to be able to modify the column property
"updatwwhereclause" like we can other properties so that we can
implement TableUpdateWhere=2.

Confused now?

On Mar 13, 3:19 pm, "Roland Smith [TeamSybase]"

<rsmith_at_trusthss_dot_com> wrote:
> According to the help file, Datawindow.Table.UpdateTable is:
>
> "A string specifying the name of the database table used to build the Update
> syntax."
>
> So how you got it to work by specifying a number is beyond me.
>
> "mhampton" <mdhamp...@gmail.com> wrote in message
>
> news:15125af5-3643-4fcc-823a-1a0a37096536@y13g2000yqn.googlegroups.com...
>
> > Prior to PB 10.5, we used the "loop through and modify the datawindow
> > for each table you need to update" method (like PFC) to have a
> > datawindow update multiple tables. We set
> > Datawindow.Table.UpdateTable=2. However, the only column that gets put
> > in the where clause is the primary key. I manually edited the
> > datawindow source to set the updatewhereclause=yes in the datawindow
> > source, and it added the columns back in, but it also added modified
> > columns from other tables.
>
> > Prior to PB 10.5, we were able to set the
> > Datawindow.Table.UpdateTable=2 and it would work as expected.
>
> > Has anyone else noticed this?
>
>


Roland Smith [TeamSybase] Posted on 2009-03-16 19:34:27.0Z
From: "Roland Smith [TeamSybase]" <rsmith_at_trusthss_dot_com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <15125af5-3643-4fcc-823a-1a0a37096536@y13g2000yqn.googlegroups.com> <49bab1d9$1@forums-1-dub> <33ba2fc0-f688-426c-87f4-3615b9e88718@d19g2000yqb.googlegroups.com>
Subject: Re: Multitable Update behavior change?
Lines: 21
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <49bea9c3$1@forums-1-dub>
Date: 16 Mar 2009 11:34:27 -0800
X-Trace: forums-1-dub 1237232067 10.22.241.152 (16 Mar 2009 11:34:27 -0800)
X-Original-Trace: 16 Mar 2009 11:34:27 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88968
Article PK: 418215

You can, this is from the PB Help:

dw_1.Modify("emp_name.Update=No")

You also need to set the column name Key property to Yes or No. This tells
it whether the column is part of the tables primary key.

Here is some code that would reset all the columns. In this example
adw_update is a reference to the datawindow object.

li_max = Integer(adw_update.Object.DataWindow.Column.Count)
For li_col = 1 To li_max
ls_name = adw_update.Describe("#" + String(li_col) + ".Name")
adw_update.Modify(ls_name + ".Update=No")
adw_update.Modify(ls_name + ".Key=No")
Next

Then set Update=Yes for all the updateable columns and Key=Yes for all the
primary key columns.


mhampton Posted on 2009-03-17 14:03:20.0Z
From: mhampton <mdhampton@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Multitable Update behavior change?
Date: Tue, 17 Mar 2009 07:03:20 -0700 (PDT)
Organization: http://groups.google.com
Lines: 27
Message-ID: <808b7d55-9a7d-41a7-be5a-dec6e26e09a5@g38g2000yqd.googlegroups.com>
References: <15125af5-3643-4fcc-823a-1a0a37096536@y13g2000yqn.googlegroups.com> <49bab1d9$1@forums-1-dub> <33ba2fc0-f688-426c-87f4-3615b9e88718@d19g2000yqb.googlegroups.com> <49bea9c3$1@forums-1-dub>
NNTP-Posting-Host: 75.117.14.4
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1237298600 21344 127.0.0.1 (17 Mar 2009 14:03:20 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 17 Mar 2009 14:03:20 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: g38g2000yqd.googlegroups.com; posting-host=75.117.14.4; posting-account=1slC8woAAAA_hCZuBpZhfWINwjNAZy9w
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7 (.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!newsfeed.yul.equant.net!nntp1.roc.gblx.net!nntp.gblx.net!nntp.gblx.net!nlpi057.nbdc.sbc.com!prodigy.net!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!g38g2000yqd.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88977
Article PK: 418228

We do all of that too, but if you set Table.UpdateWhere=2 it includes
all modified column, even if column.Update=No.

On Mar 16, 3:34 pm, "Roland Smith [TeamSybase]"

<rsmith_at_trusthss_dot_com> wrote:
> You can, this is from the PB Help:
>
> dw_1.Modify("emp_name.Update=No")
>
> You also need to set the column name Key property to Yes or No. This tells
> it whether the column is part of the tables primary key.
>
> Here is some code that would reset all the columns. In this example
> adw_update is a reference to the datawindow object.
>
> li_max = Integer(adw_update.Object.DataWindow.Column.Count)
> For li_col = 1 To li_max
>    ls_name = adw_update.Describe("#" + String(li_col) + ".Name")
>    adw_update.Modify(ls_name + ".Update=No")
>    adw_update.Modify(ls_name + ".Key=No")
> Next
>
> Then set Update=Yes for all the updateable columns and Key=Yes for all the
> primary key columns.


Roland Smith [TeamSybase] Posted on 2009-03-17 17:54:26.0Z
From: "Roland Smith [TeamSybase]" <rsmith_at_trusthss_dot_com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <15125af5-3643-4fcc-823a-1a0a37096536@y13g2000yqn.googlegroups.com> <49bab1d9$1@forums-1-dub> <33ba2fc0-f688-426c-87f4-3615b9e88718@d19g2000yqb.googlegroups.com> <49bea9c3$1@forums-1-dub> <808b7d55-9a7d-41a7-be5a-dec6e26e09a5@g38g2000yqd.googlegroups.com>
Subject: Re: Multitable Update behavior change?
Lines: 34
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <49bfe3d2$1@forums-1-dub>
Date: 17 Mar 2009 09:54:26 -0800
X-Trace: forums-1-dub 1237312466 10.22.241.152 (17 Mar 2009 09:54:26 -0800)
X-Original-Trace: 17 Mar 2009 09:54:26 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88983
Article PK: 418234

You might need to use SetItemStatus as well. I have only done multi-update
for UpdateWhere=0 so I'm not sure.

I don't use PFC but I am pretty sure it has a multi-update service. You
could look at it for ideas.

"mhampton" <mdhampton@gmail.com> wrote in message
news:808b7d55-9a7d-41a7-be5a-dec6e26e09a5@g38g2000yqd.googlegroups.com...
We do all of that too, but if you set Table.UpdateWhere=2 it includes
all modified column, even if column.Update=No.

On Mar 16, 3:34 pm, "Roland Smith [TeamSybase]"

<rsmith_at_trusthss_dot_com> wrote:
> You can, this is from the PB Help:
>
> dw_1.Modify("emp_name.Update=No")
>
> You also need to set the column name Key property to Yes or No. This tells
> it whether the column is part of the tables primary key.
>
> Here is some code that would reset all the columns. In this example
> adw_update is a reference to the datawindow object.
>
> li_max = Integer(adw_update.Object.DataWindow.Column.Count)
> For li_col = 1 To li_max
> ls_name = adw_update.Describe("#" + String(li_col) + ".Name")
> adw_update.Modify(ls_name + ".Update=No")
> adw_update.Modify(ls_name + ".Key=No")
> Next
>
> Then set Update=Yes for all the updateable columns and Key=Yes for all the
> primary key columns.