🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.delphi.database.dotnet
1 messages
1 total messages Started by Brigitte Spatz Tue, 31 Oct 2006 18:35
dataset has no changes
#147
Author: Brigitte Spatz
Date: Tue, 31 Oct 2006 18:35
34 lines
2044 bytes
I'm really puzzled by this. The following is code I use in about twenty 
places (with different dataviews, BindingManagerBases and field data of 
course) - it works in all but one case.

   dv_course := dataview.Create(ds.Tables['Kurs']);
   bm_course := Self.BindingContext[dv_course];


//dv_course.count shows the correct count
       dv_course.AllowNew := true;
       bm_course.AddNew;
       with dv_course.Item[bm_course.Position].Row do
       begin
         Item['fld_status'] := false;
         Item['fld_company'] := compnr2.ToString;
         Item['fld_tableid'] := 190;
         Item['fld_hours'] := '08:00:00';
       end;
       bm_course.EndCurrentEdit;
//dv_course.count shows one more than before, also correct

In the one case

     if ds.HasChanges then //ds = Dataset

returns false, in all other cases it returns true, as you would expect 
with a new record added and some fields set...

Has anybody heard of anything like this before? And more importantly 
knows a solution?

TIA.

Brigitte
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads