Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Updating after a rowscopy

129 views
Skip to first unread message

ICE

unread,
Jul 16, 2004, 4:30:35 AM7/16/04
to
Can anyone help me with following problem?

I have a window with a datawindow on it with a number of rows that r
retrieved from the database...
To change something one these rows, or to add new rows, a new window (with
datawindow) is opened and the rows are copied to that new window. If I do
some changes on the existing rows and close that window, the rows are copied
back to the first window on the datawindow, to check this, I made the first
datawindow visible and I see the correct data is copied. Before the second
rowcopy is done, I do a reset of the original datawindow. Now all rows on
the datawindow are NewModified!. For the rows that already existed, the
keycolumn is not null or zero. The new (added) rows have zero in the key
column. So that is how I know which rows are new and which are changed.
For the changed rows, I set the status to Datamodified!, the new rows are
left NewModified! and get a key (set from script).
When I call update, the modified rows are not updated!!! I browsed through
the newsgroups and found that I also had to change the status of each column
in the row, so I did that and now I get the error : Rows changed between
retrieve and update....
I can't find the solution

Thanks


Stephane Lobet

unread,
Jul 16, 2004, 6:27:57 AM7/16/04
to

I may be missing something, but couldn't you use sharedata()?
Will get round the problem nicely.
If the rowscopy works, the sharedata should work as well.

Another alternative is not to reset your original datawindow, but
to loop through your second DW using GetNextModified, and
only copy those rows.

Hope this helps, Stefan

"ICE" <I...@nospam.com> wrote in message news:40f792fe$1@forums-2-dub...

Kevin R

unread,
Jul 16, 2004, 8:55:45 AM7/16/04
to
Another probably easier option is to use GetFullState/SetFullState when
moving the data. This will preserve all the proper flags for the rows.
0 new messages