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.

RowsCopy vs. ColumnsCopy

4 posts in DataWindow Last posting was on 2008-10-17 09:03:08.0Z
Mark Pare Posted on 2008-10-17 02:08:54.0Z
From: "Mark Pare" <markpare@videotron.ca>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: RowsCopy vs. ColumnsCopy
Lines: 17
Organization: Legentec Software
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; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48f7f3b6$1@forums-1-dub>
Date: 16 Oct 2008 19:08:54 -0700
X-Trace: forums-1-dub 1224209334 10.22.241.152 (16 Oct 2008 19:08:54 -0700)
X-Original-Trace: 16 Oct 2008 19:08:54 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87989
Article PK: 417245

Hi, I know there is no such function as ColumnsCopy, but here is my
scenario:

I import data from a text file into a datastore (strings and longs, no other
datatype). From that datastore, I want to copy all the rows, but not all the
columns, into another datawindow that is actually displayed on the screen.
Right now, I'm doing a loop through the datastore and issuing InsertRow(0),
SetItem, SetItem, ... to put all the data into the visible datawindow.

Does anyone have any cool code that would allow me to not do this and have
some kind of ColumnsCopy functionality?

I am on PB 10.5.2 and Windows XP

Thanks


Philip Salgannik Posted on 2008-10-17 03:24:23.0Z
From: "Philip Salgannik" <philemaxNOSPAM@comcast.net>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <48f7f3b6$1@forums-1-dub>
Subject: Re: RowsCopy vs. ColumnsCopy
Lines: 25
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: <48f80567$1@forums-1-dub>
Date: 16 Oct 2008 20:24:23 -0700
X-Trace: forums-1-dub 1224213863 10.22.241.152 (16 Oct 2008 20:24:23 -0700)
X-Original-Trace: 16 Oct 2008 20:24:23 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87990
Article PK: 417246

Run a loop around the COLUMNS (not rows), skip the columns you don't need
and do a dot notation assignment of columns you want...

"Mark Pare" <markpare@videotron.ca> wrote in message
news:48f7f3b6$1@forums-1-dub...
> Hi, I know there is no such function as ColumnsCopy, but here is my
> scenario:
>
> I import data from a text file into a datastore (strings and longs, no
> other datatype). From that datastore, I want to copy all the rows, but not
> all the columns, into another datawindow that is actually displayed on the
> screen. Right now, I'm doing a loop through the datastore and issuing
> InsertRow(0), SetItem, SetItem, ... to put all the data into the visible
> datawindow.
>
> Does anyone have any cool code that would allow me to not do this and have
> some kind of ColumnsCopy functionality?
>
> I am on PB 10.5.2 and Windows XP
>
> Thanks
>
>


Jeremy Lakeman Posted on 2008-10-17 06:09:57.0Z
From: Jeremy Lakeman <jeremy.lakeman@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: RowsCopy vs. ColumnsCopy
Date: Thu, 16 Oct 2008 23:09:57 -0700 (PDT)
Organization: http://groups.google.com
Lines: 32
Message-ID: <c66cdf63-e8ee-474d-aafd-8898cfcb462b@k30g2000hse.googlegroups.com>
References: <48f7f3b6$1@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 1224223797 27413 127.0.0.1 (17 Oct 2008 06:09:57 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 17 Oct 2008 06:09:57 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: k30g2000hse.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.3) Gecko/2008092417 Firefox/3.0.3,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!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!border2.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!k30g2000hse.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87991
Article PK: 417247


On Oct 17, 12:08 pm, "Mark Pare" <markp...@videotron.ca> wrote:
> Hi, I know there is no such function as ColumnsCopy, but here is my
> scenario:
>
> I import data from a text file into a datastore (strings and longs, no other
> datatype). From that datastore, I want to copy all the rows, but not all the
> columns, into another datawindow that is actually displayed on the screen.
> Right now, I'm doing a loop through the datastore and issuing InsertRow(0),
> SetItem, SetItem, ... to put all the data into the visible datawindow.
>
> Does anyone have any cool code that would allow me to not do this and have
> some kind of ColumnsCopy functionality?
>
> I am on PB 10.5.2 and Windows XP
>
> Thanks

If all the columns you need are together;
dw.object.data = ds.Object.Data[1, ds.rowcount(), N, M]

otherwise as philip suggested;
dw.object.col_1.primary = ds.Object.col_1.primary
dw.object.col_2.primary = ds.Object.col_2.primary
...


Arthur Hefti Posted on 2008-10-17 09:03:08.0Z
From: "Arthur Hefti" <arthur@catsoft.ch>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <48f7f3b6$1@forums-1-dub>
Subject: Re: RowsCopy vs. ColumnsCopy
Lines: 29
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: <48f854cc$1@forums-1-dub>
Date: 17 Oct 2008 02:03:08 -0700
X-Trace: forums-1-dub 1224234188 10.22.241.152 (17 Oct 2008 02:03:08 -0700)
X-Original-Trace: 17 Oct 2008 02:03:08 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87992
Article PK: 417248

Drop the columns you don't need in the first datastore with Modify( "DESTROY
COLUMN <xx>"). If the remaining columns match the 2nd datastore you can move
the data with dw_second.object.data = dw_first.object.data

Arthur

"Mark Pare" <markpare@videotron.ca> wrote in message
news:48f7f3b6$1@forums-1-dub...
> Hi, I know there is no such function as ColumnsCopy, but here is my
> scenario:
>
> I import data from a text file into a datastore (strings and longs, no
> other datatype). From that datastore, I want to copy all the rows, but not
> all the columns, into another datawindow that is actually displayed on the
> screen. Right now, I'm doing a loop through the datastore and issuing
> InsertRow(0), SetItem, SetItem, ... to put all the data into the visible
> datawindow.
>
> Does anyone have any cool code that would allow me to not do this and have
> some kind of ColumnsCopy functionality?
>
> I am on PB 10.5.2 and Windows XP
>
> Thanks
>
>