Click here to Skip to main content
15,922,309 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: .NET app run on Win2003 from another Win2003? Pin
Dave Kreskowiak30-Aug-05 9:53
mveDave Kreskowiak30-Aug-05 9:53 
QuestionMicrosoft .NET Passport Pin
Dario Solera30-Aug-05 1:24
Dario Solera30-Aug-05 1:24 
AnswerRe: Microsoft .NET Passport Pin
Dave Kreskowiak30-Aug-05 10:04
mveDave Kreskowiak30-Aug-05 10:04 
GeneralRe: Microsoft .NET Passport Pin
Dario Solera30-Aug-05 11:25
Dario Solera30-Aug-05 11:25 
QuestionUSB Flash Drive or CF access Pin
LiamD30-Aug-05 0:37
LiamD30-Aug-05 0:37 
AnswerRe: USB Flash Drive or CF access Pin
eggie530-Aug-05 12:17
eggie530-Aug-05 12:17 
GeneralRe: USB Flash Drive or CF access Pin
LiamD30-Aug-05 23:21
LiamD30-Aug-05 23:21 
QuestionWhy ?: dataset GetChanges->Update->Merge Pin
30-Aug-05 0:13
suss30-Aug-05 0:13 
Hello Everybody !
Does anybody know, why in some articles here, and also in VS.NET -generated Databound form the following logic is used to save DataSet changes to database:

SaveChanges(){

DataSet datasetWithChanges=dataSetUsedByControls.GetChanges();
if (datasetWithChanges != null)
{
SaveChangesToDB(datasetWithChanges); // function where adapters save changes to db.
dataSetUsedByControls.Merge(datasetWithChanges);
dataSetUsedByControls.AcceptChanges();
}
}

I tend to use:

SaveChanges(){

if (dataSetUsedByControls.HasChanges())
{
SaveChangesToDB(dataSetUsedByControls); // function where adapters save changes to db.
dataSetUsedByControls.AcceptChanges();
}
}

So why GetChanges - apply them and then merge with original dataset ? We can simply pass the originald ataset to adapter and changes will also be saved.

Can anyone explain why Microsoft has implemented the first variant it it's data-bound form wizard, and also why some articles use this variant as well ? Where is the trick ?

For example here:
http://www.codeproject.com/csharp/PracticalGuideDataGrids4.asp[^]


-- modified at 6:13 Tuesday 30th August, 2005
AnswerRe: Why ?: dataset GetChanges->Update->Merge Pin
Al Ortega30-Aug-05 8:13
Al Ortega30-Aug-05 8:13 
GeneralRe: Why ?: dataset GetChanges->Update->Merge Pin
wolver-hampton-wanderer30-Aug-05 12:12
wolver-hampton-wanderer30-Aug-05 12:12 
GeneralRe: Why ?: dataset GetChanges->Update->Merge Pin
Al Ortega30-Aug-05 14:09
Al Ortega30-Aug-05 14:09 
GeneralRe: Why ?: dataset GetChanges->Update->Merge Pin
wolver-hampton-wanderer30-Aug-05 21:18
wolver-hampton-wanderer30-Aug-05 21:18 
GeneralRe: Why ?: dataset GetChanges->Update->Merge Pin
Al Ortega31-Aug-05 12:10
Al Ortega31-Aug-05 12:10 
GeneralRe: Why ?: dataset GetChanges->Update->Merge Pin
wolver-hampton-wanderer31-Aug-05 20:40
wolver-hampton-wanderer31-Aug-05 20:40 
QuestionAdd a password to uninstall MSI ? Pin
mcjonnes29-Aug-05 23:49
mcjonnes29-Aug-05 23:49 
AnswerRe: Add a password to uninstall MSI ? Pin
rwestgraham30-Aug-05 20:03
rwestgraham30-Aug-05 20:03 
QuestionPermissions for GACUTIL Pin
Account Removal29-Aug-05 22:21
Account Removal29-Aug-05 22:21 
QuestionResizing the TextBox Pin
seanwright29-Aug-05 1:49
seanwright29-Aug-05 1:49 
AnswerRe: Resizing the TextBox Pin
seanwright29-Aug-05 5:22
seanwright29-Aug-05 5:22 
AnswerRe: Resizing the TextBox Pin
toxcct29-Aug-05 22:31
toxcct29-Aug-05 22:31 
GeneralRe: Resizing the TextBox Pin
seanwright30-Aug-05 2:56
seanwright30-Aug-05 2:56 
AnswerRe: Resizing the TextBox - solution found! Pin
seanwright30-Aug-05 3:34
seanwright30-Aug-05 3:34 
QuestionRedirecting by IP Pin
delicious-code28-Aug-05 22:06
delicious-code28-Aug-05 22:06 
QuestionGenerating CHM Files From .Net IDE Pin
mohsin_m28-Aug-05 19:08
mohsin_m28-Aug-05 19:08 
QuestionPassword Policy Pin
Barm28-Aug-05 16:47
Barm28-Aug-05 16:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.