🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.delphi.database.dotnet
Article #147

dataset has no changes

#147
From: 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
Technical Details
Message-ID: <4547978a@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!ecngs!feeder.ecngs.de!news.osn.de!diablo2.news.osn.de!news.belwue.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 1effe6,c444631039e2315c,start
X-Google-Attributes: gid1effe6,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Tue, 31 Oct 2006 19:35:53 +0100
From: Brigitte Spatz <brigitteNOSPAM.spatz@svenmahn.de>
Organization: Sven Mahn IT-Systementwicklungen
User-Agent: Thunderbird 1.5.0.7 (Windows/20060909)
MIME-Version: 1.0
Newsgroups: borland.public.delphi.database.dotnet
Subject: dataset has no changes
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 0644-4, 31/10/2006), Outbound message
X-Antivirus-Status: Clean
NNTP-Posting-Host: 217.189.152.61
Message-ID: <4547978a@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1162319754 217.189.152.61 (31 Oct 2006 10:35:54 -0700)
Lines: 34
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!ecngs!feeder.ecngs.de!news.osn.de!diablo2.news.osn.de!news.belwue.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail