954,514 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Newbie DB problem

I'm new to C# and am having a problem with databases, specifically updating a table with dataset contents. No exceptions are being thrown, the update method tells me one row is affected but there is nothing in the table! Code below, your help is appreciated.

RSSDataSet.NewsItemRow newRow = rSSDataSet.NewsItem.NewNewsItemRow();
newRow.title = "a";
newRow.description = "a";
newRow.link = "a";
newRow.dateAcquired = DateTime.Now;
newRow.channelID = 1;

this.rSSDataSet.NewsItem.Rows.Add(newRow);                         
                
int result = this.newsItemTableAdapter.Update(this.rSSDataSet.NewsItem);
                
// Alternatively
newsItemTableAdapter.Insert("aa", "a", "a", DateTime.Now, 1);
tangosixfour
Newbie Poster
1 post since Nov 2010
Reputation Points: 10
Solved Threads: 0
 

You would like to insert some data to Database, from DataSet, am i correct?
Can i see the code which creates and populates the dataSet?

Mitja Bonca
Nearly a Posting Maven
2,485 posts since May 2009
Reputation Points: 641
Solved Threads: 474
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: