Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / September 2007

Tip: Looking for answers? Try searching our database.

Updating the table: why not?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
vinnie - 16 Sep 2007 18:21 GMT
I made simple project where it show a table (that i previously made in
MS SQL).

When i start the project and i add a row, clicking the save button all
work. But if i want to cancel the full row, the cancel button does not
perform the job, practically nothing happens. The code behind the
cancel_button click event is:

private void BtnCancel_Click(object sender, EventArgs e)
       {
           this.CMSDataSet1.tbl_worker.Clear();

this.tbl_workerTableAdapter.Fill(this.CMSDataSet1.tbl_worker);
       }

Thanks
Matteo Migliore - 17 Sep 2007 01:31 GMT
> I made simple project where it show a table (that i previously made in
> MS SQL).
>
> When i start the project and i add a row, clicking the save button all
> work. But if i want to cancel the full row, the cancel button does not
> perform the job, practically nothing happens.

It's not clear: do you want to delere a row of the DataTable?

Here's the code:
------------------------
DataRow rowDel=ds.Tables[TBL_NAME].Rows[2];
rowDel.Delete();
ds.Tables[TBL_NAME]. AcceptChanges();
sqlAdap.Update(ds.Tables[TBL_NAME]);  
------------------------

Matteo Migliore.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.