Article View: pl.comp.lang.vbasic
Article #104833Re: problem z zapisem DataSet-u w bazie
From: ktos
Date: Mon, 16 May 2011 11:33
Date: Mon, 16 May 2011 11:33
32 lines
2086 bytes
2086 bytes
W dniu 2011-05-15 21:10, JacekD pisze:
> Witajcie,
>
> Zaznaczam, że googlałem i szukałem na MSDN-ie, ale jakoś nie natrafiłem na
> rozwiązanie mojego problemu. A więc opisuję, o co chodzi:
> rwRekord("wartosc") = _wartosc
> tbRejestrBledow.Rows.Add(rwRekord)
> dsZIFC.AcceptChanges()
>
> I mimo użycia metody AcceptChanges dla DataSet-u, nie mam zapisów w bazie
> danych. Czy ktoś z szanownych kolegów jest mi w stanie łopatologicznie
> powiedzieć, co robię źle?
>
> Z góry dzięki
> Jacek
>
wpisujesz w google: dataset acceptchanges
i drugi link:
http://social.msdn.microsoft.com/Forums/en/adodotnetdataset/thread/71a3d1e1-2588-499d-b603-c5c643f6fe50
wyjaśnia twój problem:
AcceptChanges only updates your rows in the (in memory) dataset, that is
- marks them as "not needed for actual database update". If you want to
update your rows to the database, call your tableadapter's Update
method................
A lot of people use AcceptChanges and wonder why their database was not
updated. you should not call accept changes ....
Technical Details
Message-ID:
<iqr228$lb2$1@node2.news.atman.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!news.nask.pl!news.nask.org.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mailReferences:
<524f.0000041f.4dd0252d@newsgate.onet.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!news.nask.pl!news.nask.org.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mail From: ktos <ktos@nikt.pl> Newsgroups: pl.comp.lang.vbasic Subject: Re: problem z zapisem DataSet-u w bazie Date: Mon, 16 May 2011 13:33:26 +0200 Organization: ATMAN - ATM S.A. Lines: 33 Message-ID: <iqr228$lb2$1@node2.news.atman.pl> References: <524f.0000041f.4dd0252d@newsgate.onet.pl> NNTP-Posting-Host: 82-160-205-162.tktelekom.pl Mime-Version: 1.0 X-Trace: node2.news.atman.pl 1305545608 21858 82.160.205.162 (16 May 2011 11:33:28 GMT) X-Complaints-To: usenet@atman.pl NNTP-Posting-Date: Mon, 16 May 2011 11:33:28 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; pl; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 In-Reply-To: <524f.0000041f.4dd0252d@newsgate.onet.pl> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit