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.

Copying a row of data to another row

4 posts in DataWindow Last posting was on 2008-03-23 16:21:27.0Z
Don Posted on 2008-03-23 00:04:26.0Z
From: "Don" <dmcquade@dmapros.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Copying a row of data to another row
Lines: 13
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <47e59e8a$1@forums-1-dub>
Date: 22 Mar 2008 16:04:26 -0800
X-Trace: forums-1-dub 1206230666 10.22.241.152 (22 Mar 2008 16:04:26 -0800)
X-Original-Trace: 22 Mar 2008 16:04:26 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:86507
Article PK: 415767

I have multiple tables with a lot of columns. The users of the application
would like to populate freeform datawindows with the data from a previous
row (record). Only 1 table is used in each of the datawindows and I know the
primary key values for the rows to copy from and to. What is the most
efficient way to have a user click a button or select a menu option to
populate the current row with all the values (minus the primary key) from a
prior row? The version of PB is 10.2 and the database is MS SQL 2005. Any
ideas or suggestions would be much appreciated.

Thanks
Don


"Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel Posted on 2008-03-23 00:24:14.0Z
From: "Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <47e59e8a$1@forums-1-dub>
Subject: Re: Copying a row of data to another row
Lines: 28
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.3198
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <47e5a32e$1@forums-1-dub>
Date: 22 Mar 2008 16:24:14 -0800
X-Trace: forums-1-dub 1206231854 10.22.241.152 (22 Mar 2008 16:24:14 -0800)
X-Original-Trace: 22 Mar 2008 16:24:14 -0800, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:86508
Article PK: 415769

This is one case where dot notation is worth using. Hold the value of the
key column for the receiving row, copy the data from one row to the other -
see "Syntax for data in a single row or all rows" in help, then reset the
key value.
I would also consider resetting the status of the key column in the
receiving row to NotModified! so that you get the SQL you are after - if you
have delete and insert as the update options that could set off some ugly
cascades.

"Don" <dmcquade@dmapros.com> wrote in message
news:47e59e8a$1@forums-1-dub...
>I have multiple tables with a lot of columns. The users of the application
> would like to populate freeform datawindows with the data from a previous
> row (record). Only 1 table is used in each of the datawindows and I know
> the
> primary key values for the rows to copy from and to. What is the most
> efficient way to have a user click a button or select a menu option to
> populate the current row with all the values (minus the primary key) from
> a
> prior row? The version of PB is 10.2 and the database is MS SQL 2005. Any
> ideas or suggestions would be much appreciated.
>
> Thanks
> Don
>
>


Don Posted on 2008-03-23 07:35:07.0Z
From: "Don" <dmcquade@dmapros.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <47e59e8a$1@forums-1-dub> <47e5a32e$1@forums-1-dub>
Subject: Re: Copying a row of data to another row
Lines: 49
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <47e6082b@forums-1-dub>
Date: 22 Mar 2008 23:35:07 -0800
X-Trace: forums-1-dub 1206257707 10.22.241.152 (22 Mar 2008 23:35:07 -0800)
X-Original-Trace: 22 Mar 2008 23:35:07 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:86509
Article PK: 415770

Thanks Jerry

I created a second hidden datawindow control using the same freeform
datawindow. I called the previous record in this DW control and used the
dw_1.Object.Data[1] = dw_2.Object.Data[1]. I then reset the primary key back
to the original and updated the datawindow. Worked like a charm

Thanks again :-)
Don

"Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com> wrote in message
news:47e5a32e$1@forums-1-dub...
> This is one case where dot notation is worth using. Hold the value of the
> key column for the receiving row, copy the data from one row to the
other -
> see "Syntax for data in a single row or all rows" in help, then reset the
> key value.
> I would also consider resetting the status of the key column in the
> receiving row to NotModified! so that you get the SQL you are after - if
you
> have delete and insert as the update options that could set off some ugly
> cascades.
>
> "Don" <dmcquade@dmapros.com> wrote in message
> news:47e59e8a$1@forums-1-dub...
> >I have multiple tables with a lot of columns. The users of the
application
> > would like to populate freeform datawindows with the data from a
previous
> > row (record). Only 1 table is used in each of the datawindows and I know
> > the
> > primary key values for the rows to copy from and to. What is the most
> > efficient way to have a user click a button or select a menu option to
> > populate the current row with all the values (minus the primary key)
from
> > a
> > prior row? The version of PB is 10.2 and the database is MS SQL 2005.
Any
> > ideas or suggestions would be much appreciated.
> >
> > Thanks
> > Don
> >
> >
>
>


"Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel Posted on 2008-03-23 16:21:27.0Z
From: "Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <47e59e8a$1@forums-1-dub> <47e5a32e$1@forums-1-dub> <47e6082b@forums-1-dub>
Subject: Re: Copying a row of data to another row
Lines: 58
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.3198
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <47e68387@forums-1-dub>
Date: 23 Mar 2008 08:21:27 -0800
X-Trace: forums-1-dub 1206289287 10.22.241.152 (23 Mar 2008 08:21:27 -0800)
X-Original-Trace: 23 Mar 2008 08:21:27 -0800, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:86511
Article PK: 415780

If you don't need to show the data, use a datastore. It will be a little
more efficient since the visual elements don't get painted (unless you print
it).

"Don" <dmcquade@dmapros.com> wrote in message news:47e6082b@forums-1-dub...
> Thanks Jerry
>
> I created a second hidden datawindow control using the same freeform
> datawindow. I called the previous record in this DW control and used the
> dw_1.Object.Data[1] = dw_2.Object.Data[1]. I then reset the primary key
> back
> to the original and updated the datawindow. Worked like a charm
>
> Thanks again :-)
> Don
>
>
> "Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com> wrote in message
> news:47e5a32e$1@forums-1-dub...
>> This is one case where dot notation is worth using. Hold the value of the
>> key column for the receiving row, copy the data from one row to the
> other -
>> see "Syntax for data in a single row or all rows" in help, then reset the
>> key value.
>> I would also consider resetting the status of the key column in the
>> receiving row to NotModified! so that you get the SQL you are after - if
> you
>> have delete and insert as the update options that could set off some ugly
>> cascades.
>>
>> "Don" <dmcquade@dmapros.com> wrote in message
>> news:47e59e8a$1@forums-1-dub...
>> >I have multiple tables with a lot of columns. The users of the
> application
>> > would like to populate freeform datawindows with the data from a
> previous
>> > row (record). Only 1 table is used in each of the datawindows and I
>> > know
>> > the
>> > primary key values for the rows to copy from and to. What is the most
>> > efficient way to have a user click a button or select a menu option to
>> > populate the current row with all the values (minus the primary key)
> from
>> > a
>> > prior row? The version of PB is 10.2 and the database is MS SQL 2005.
> Any
>> > ideas or suggestions would be much appreciated.
>> >
>> > Thanks
>> > Don
>> >
>> >
>>
>>
>
>