Click here to Skip to main content
16,005,149 members
Home / Discussions / C#
   

C#

 
GeneralRe: Strange behaviour of StreamReader.Peek() Pin
Stefan Troschuetz11-Nov-04 4:45
Stefan Troschuetz11-Nov-04 4:45 
GeneralRe: Strange behaviour of StreamReader.Peek() Pin
Daniel Turini11-Nov-04 5:37
Daniel Turini11-Nov-04 5:37 
GeneralRe: Strange behaviour of StreamReader.Peek() Pin
leppie11-Nov-04 5:43
leppie11-Nov-04 5:43 
GeneralRe: Strange behaviour of StreamReader.Peek() Pin
SebbaP11-Nov-04 10:12
SebbaP11-Nov-04 10:12 
GeneralRe: Strange behaviour of StreamReader.Peek() Pin
Stefan Troschuetz11-Nov-04 22:04
Stefan Troschuetz11-Nov-04 22:04 
GeneralClearing DateTimePicker Pin
MagdyYousif11-Nov-04 2:29
MagdyYousif11-Nov-04 2:29 
GeneralRe: Clearing DateTimePicker Pin
Corinna John11-Nov-04 3:09
Corinna John11-Nov-04 3:09 
GeneralDATASETS Pin
Brendan Vogt11-Nov-04 1:29
Brendan Vogt11-Nov-04 1:29 
Hi,

I have a query with regards to data sets.

I have the following declarations in C#.NET, it's just brief, so I hope it makes sense:

SqlDataAdapter adptContacts;
dsContacts.ContactsRow rowNew;
rowNew = dsContacts.Contacts.NewContactsRow();

rowNew.ContactID = GetNewContactID();
rowNew.FirstName = txtFirstName.Text;
rowNew.LastName = txtLastName.Text;

I have code that adds data to the new row, then I add the code to the data set using the following code:

dsContacts.Contacts.AddContactsRow(rowNew);

I modify the database like this:

adptContacts.Update(dsContacts);

I just want to know when adding data to the database like I did. As far as I understand it, a dataset contains data retrieved from the database. So when I do my update, does it delete the data in the table and all the data in the data set, or does it just add the new row to the table?

Brendan
GeneralRe: DATASETS Pin
Skynyrd11-Nov-04 3:55
Skynyrd11-Nov-04 3:55 
GeneralRe: DATASETS Pin
Le centriste11-Nov-04 4:12
Le centriste11-Nov-04 4:12 
GeneralBinding Collection to DataGrid Pin
Derec Roofie11-Nov-04 1:24
Derec Roofie11-Nov-04 1:24 
GeneralRe: Binding Collection to DataGrid Pin
Daniel Turini11-Nov-04 2:07
Daniel Turini11-Nov-04 2:07 
GeneralRe: Binding Collection to DataGrid Pin
Derec Roofie11-Nov-04 5:18
Derec Roofie11-Nov-04 5:18 
GeneralRe: Binding Collection to DataGrid Pin
Daniel Turini11-Nov-04 5:26
Daniel Turini11-Nov-04 5:26 
QuestionHow to determin parent class Pin
Derec Roofie11-Nov-04 1:14
Derec Roofie11-Nov-04 1:14 
AnswerRe: How to determin parent class Pin
Daniel Turini11-Nov-04 2:06
Daniel Turini11-Nov-04 2:06 
GeneralC# attribute - hlp Pin
dstefan8210-Nov-04 23:45
dstefan8210-Nov-04 23:45 
GeneralNetwork traffic monitoring Pin
JeffHarrold10-Nov-04 22:32
JeffHarrold10-Nov-04 22:32 
GeneralRe: Network traffic monitoring Pin
leppie11-Nov-04 0:19
leppie11-Nov-04 0:19 
GeneralRe: Network traffic monitoring Pin
JeffHarrold11-Nov-04 0:56
JeffHarrold11-Nov-04 0:56 
GeneralRe: Network traffic monitoring Pin
yoaz11-Nov-04 7:27
yoaz11-Nov-04 7:27 
GeneralRe: Network traffic monitoring Pin
JeffHarrold11-Nov-04 11:41
JeffHarrold11-Nov-04 11:41 
GeneralRe: Network traffic monitoring Pin
yoaz11-Nov-04 22:40
yoaz11-Nov-04 22:40 
Generalobtaining values of documentproperties for printing Pin
jomargon10-Nov-04 22:29
jomargon10-Nov-04 22:29 
GeneralBitmap from MetaFile Pin
3green10-Nov-04 22:03
3green10-Nov-04 22:03 

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.