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.

Datawindow add a column

7 posts in DataWindow Last posting was on 2008-09-09 15:35:09.0Z
Sharon Posted on 2008-09-04 17:23:15.0Z
Sender: 6d6c.48c018bc.1804289383@sybase.com
From: Sharon
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Datawindow add a column
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <48c01983.6da6.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 4 Sep 2008 10:23:15 -0700
X-Trace: forums-1-dub 1220548995 10.22.241.41 (4 Sep 2008 10:23:15 -0700)
X-Original-Trace: 4 Sep 2008 10:23:15 -0700, 10.22.241.41
Lines: 9
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87702
Article PK: 416958

using pb 11.2
I have a datawindow that is created from a stored procedure.
After that datawindow is retrieved is it possible to add a
column to the end of each row?

I don't want to change the stored procedure, can I add the
column on the PB side?

I tried dw_rpt.addcolumn(...) but that didn't work.


Chris Pollach Posted on 2008-09-04 17:35:40.0Z
From: "Chris Pollach" <cpollach@travel-net.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <48c01983.6da6.1681692777@sybase.com>
Subject: Re: Datawindow add a column
Lines: 36
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; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48c01c6c$1@forums-1-dub>
Date: 4 Sep 2008 10:35:40 -0700
X-Trace: forums-1-dub 1220549740 10.22.241.152 (4 Sep 2008 10:35:40 -0700)
X-Original-Trace: 4 Sep 2008 10:35:40 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87703
Article PK: 416959

Hi Sharon;

The AddColumn is for a ListView object not a DW. For the DWO use the
following Modify ( ) syntax ...

<DW Control Name>.Modify( &
"create column( id=<an integer> tabsequence=<an integer> accelerator='<a
single letter>' moveable=<0 - False, 1 - True> resizeable=<0 - False, 1 -
True> pointer='<Arrow!, Cross!, HourGlass!, IBeam!, Icon!, Size!, SizeNESW!,
SizeNS!, SizeNWSE!, SizeWE!, UpArrow!, or cursor filename (with path)>'
...
edit.autohscroll=<Yes or No> edit.autoselect=<Yes or No>
edit.vscrollbar=<Yes or No> edit.name='<repository style name, if any>') ")

Tip: Use the DWSyntax Utility to help generate that for you.

HTH

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

<Sharon> wrote in message news:48c01983.6da6.1681692777@sybase.com...
> using pb 11.2
> I have a datawindow that is created from a stored procedure.
> After that datawindow is retrieved is it possible to add a
> column to the end of each row?
>
> I don't want to change the stored procedure, can I add the
> column on the PB side?
>
> I tried dw_rpt.addcolumn(...) but that didn't work.


"Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel Posted on 2008-09-04 18:06:48.0Z
From: "Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <48c01983.6da6.1681692777@sybase.com> <48c01c6c$1@forums-1-dub>
Subject: Re: Datawindow add a column
Lines: 47
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.5579
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48c023b8$1@forums-1-dub>
Date: 4 Sep 2008 11:06:48 -0700
X-Trace: forums-1-dub 1220551608 10.22.241.152 (4 Sep 2008 11:06:48 -0700)
X-Original-Trace: 4 Sep 2008 11:06:48 -0700, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87706
Article PK: 416962

That only adds a visible column control. To add the column to the buffers
you will have to replace the entire Table property. Note that there are two
mentions of the column there - one in the retrieve and one in the
table(column= .... Do an edit source on the DW to see what you need.

"Chris Pollach" <cpollach@travel-net.com> wrote in message
news:48c01c6c$1@forums-1-dub...
> Hi Sharon;
>
> The AddColumn is for a ListView object not a DW. For the DWO use the
> following Modify ( ) syntax ...
>
> <DW Control Name>.Modify( &
> "create column( id=<an integer> tabsequence=<an integer> accelerator='<a
> single letter>' moveable=<0 - False, 1 - True> resizeable=<0 - False, 1 -
> True> pointer='<Arrow!, Cross!, HourGlass!, IBeam!, Icon!, Size!,
> SizeNESW!, SizeNS!, SizeNWSE!, SizeWE!, UpArrow!, or cursor filename (with
> path)>'
> ...
> edit.autohscroll=<Yes or No> edit.autoselect=<Yes or No>
> edit.vscrollbar=<Yes or No> edit.name='<repository style name, if any>')
> ")
>
> Tip: Use the DWSyntax Utility to help generate that for you.
>
> HTH
>
> --
> Regards ... Chris
> ISUG - NA RUG Director
> http://chrispollach.pbdjmagazine.com
>
>
> <Sharon> wrote in message news:48c01983.6da6.1681692777@sybase.com...
>> using pb 11.2
>> I have a datawindow that is created from a stored procedure.
>> After that datawindow is retrieved is it possible to add a
>> column to the end of each row?
>>
>> I don't want to change the stored procedure, can I add the
>> column on the PB side?
>>
>> I tried dw_rpt.addcolumn(...) but that didn't work.
>
>


"John Olson [Team Sybase]" <john.olson Posted on 2008-09-04 17:54:57.0Z
From: "John Olson [Team Sybase]" <john.olson@nospam_teamsybase.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <48c01983.6da6.1681692777@sybase.com>
Subject: Re: Datawindow add a column
Lines: 21
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48c020f1@forums-1-dub>
Date: 4 Sep 2008 10:54:57 -0700
X-Trace: forums-1-dub 1220550897 10.22.241.152 (4 Sep 2008 10:54:57 -0700)
X-Original-Trace: 4 Sep 2008 10:54:57 -0700, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87704
Article PK: 416960

You could open the DW painter, go to the column specs, and add a new column.
My test shows that PB won't complain about the extra column (I'm using SQL
Anywhere). After retrieve you can use that column as a utility col.

Give it a shot.

Regards,
John

<Sharon> wrote in message news:48c01983.6da6.1681692777@sybase.com...
> using pb 11.2
> I have a datawindow that is created from a stored procedure.
> After that datawindow is retrieved is it possible to add a
> column to the end of each row?
>
> I don't want to change the stored procedure, can I add the
> column on the PB side?
>
> I tried dw_rpt.addcolumn(...) but that didn't work.


Jeremy Lakeman Posted on 2008-09-05 01:35:46.0Z
From: Jeremy Lakeman <jeremy.lakeman@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Datawindow add a column
Date: Thu, 4 Sep 2008 18:35:46 -0700 (PDT)
Organization: http://groups.google.com
Lines: 39
Message-ID: <6332a86c-def0-40bf-b17c-8c08c1cce5a3@73g2000hsx.googlegroups.com>
References: <48c01983.6da6.1681692777@sybase.com> <48c020f1@forums-1-dub>
NNTP-Posting-Host: 203.122.242.105
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1220578546 28363 127.0.0.1 (5 Sep 2008 01:35:46 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 5 Sep 2008 01:35:46 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: 73g2000hsx.googlegroups.com; posting-host=203.122.242.105; posting-account=euaBtgoAAAC_vDxfsxmpMKlBxHaHpmRS
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1,gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.1 fly.essential.com.au:3128 (squid/2.5.STABLE8), 1.0 asp.essential.intranet:3128 (squid/2.5.STABLE8)
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!73g2000hsx.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87707
Article PK: 416963

That would depend entirely on the type of database you are connecting
to.
Having a column in the datawindow that wasn't returned by the stored
proc in ASE 12.5.4 would definitely result in a DB error.

No, what I would suggest is having 2 datawindow objects defined. The
first has the existing result set that matches the stored procedures
result. The second has whatever you want in it. Retrieve the first in
a datastore, then copy the column values you need to the second
datawindow and resetupdate().

For extra credit you could create the syntax for the second datawindow
at run time based on the first one (or vice versa).


On Sep 5, 2:54 am, "John Olson [Team Sybase]"

<john.olson@nospam_teamsybase.com> wrote:
> You could open the DW painter, go to the column specs, and add a new column.
> My test shows that PB won't complain about the extra column (I'm using SQL
> Anywhere). After retrieve you can use that column as a utility col.
>
> Give it a shot.
>
> Regards,
> John
>
> <Sharon> wrote in messagenews:48c01983.6da6.1681692777@sybase.com...
> > using pb 11.2
> > I have a datawindow that is created from a stored procedure.
> > After that datawindow is retrieved is it possible to add a
> > column to the end of each row?
>
> > I don't want to change the stored procedure, can I add the
> > column on the PB side?
>
> > I tried dw_rpt.addcolumn(...) but that didn't work.


"John Olson [Team Sybase]" <john.olson Posted on 2008-09-09 15:35:09.0Z
From: "John Olson [Team Sybase]" <john.olson@nospam_teamsybase.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <48c01983.6da6.1681692777@sybase.com> <48c020f1@forums-1-dub>
Subject: Re: Datawindow add a column
Lines: 33
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.3138
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48c697ad@forums-1-dub>
Date: 9 Sep 2008 08:35:09 -0700
X-Trace: forums-1-dub 1220974509 10.22.241.152 (9 Sep 2008 08:35:09 -0700)
X-Original-Trace: 9 Sep 2008 08:35:09 -0700, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87727
Article PK: 416983

As you can see you have a few options, some easier than others, but each
with it's own advantages and disadvantages. If using the placeholder column
doesn't work for your database I'd probably go with the two DWs.

Regards,
John

"John Olson [Team Sybase]" <john.olson@nospam_teamsybase.com> wrote in
message news:48c020f1@forums-1-dub...
> You could open the DW painter, go to the column specs, and add a new
> column. My test shows that PB won't complain about the extra column (I'm
> using SQL Anywhere). After retrieve you can use that column as a utility
> col.
>
> Give it a shot.
>
> Regards,
> John
>
> <Sharon> wrote in message news:48c01983.6da6.1681692777@sybase.com...
>> using pb 11.2
>> I have a datawindow that is created from a stored procedure.
>> After that datawindow is retrieved is it possible to add a
>> column to the end of each row?
>>
>> I don't want to change the stored procedure, can I add the
>> column on the PB side?
>>
>> I tried dw_rpt.addcolumn(...) but that didn't work.
>
>


Bruce Armstrong [TeamSybase] Posted on 2008-09-04 17:56:07.0Z
From: "Bruce Armstrong [TeamSybase]" <NOCANSPAM_bruce.armstrong@teamsybase.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <48c01983.6da6.1681692777@sybase.com>
Subject: Re: Datawindow add a column
Lines: 20
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: <48c02137$1@forums-1-dub>
Date: 4 Sep 2008 10:56:07 -0700
X-Trace: forums-1-dub 1220550967 10.22.241.152 (4 Sep 2008 10:56:07 -0700)
X-Original-Trace: 4 Sep 2008 10:56:07 -0700, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87705
Article PK: 416961

1. Create a new datawindow based on the modified stored procedure.
2. Open up both datawindows in edit source mode
3. Add the new column definition from the new datawindow into the "table"
section of the old datawindow.
4. Save the changes to the old datwindow and you should now be able to add
the column to the visual portion of the datawindow.

<Sharon> wrote in message news:48c01983.6da6.1681692777@sybase.com...
> using pb 11.2
> I have a datawindow that is created from a stored procedure.
> After that datawindow is retrieved is it possible to add a
> column to the end of each row?
>
> I don't want to change the stored procedure, can I add the
> column on the PB side?
>
> I tried dw_rpt.addcolumn(...) but that didn't work.