Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 28th, 2005, 04:51 AM
Registered User
 
Join Date: Jun 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Updating database

This question may sound simple, but it still needs answering.
My project uses the basic tools from the toolbox for creating connections to an MDB database. All of the TextBoxes and Combo Boxes are linked to the data using basic properties...

I can get info from the database, but I want the database to be updated according to the changes made durring the execution of the program. The DataSet1.AcceptChanges() method doesn't seem to work. What should I do?

In the book, Beginning Visual C#, the chapter includes the answer, but for VS 2003. I am using VS 2005. I can't find the SQLDataAdapter object used in the book.

 
Old June 28th, 2005, 06:03 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

If you assign values from the database to controls thru properties, you have to do the reverse to get the values back to the database. This means assigning the values from the controls back to the appropriate columns in the datatable and the calling the dataset's AcceptChanges method.

-Peter





Similar Threads
Thread Thread Starter Forum Replies Last Post
updating database musicradiolive Classic ASP Databases 1 August 17th, 2006 12:23 AM
database not updating ellie BOOK: Beginning ASP 3.0 1 April 16th, 2006 05:28 AM
Help for Updating the database bspradeep Classic ASP Databases 1 May 10th, 2005 03:13 AM
Updating a database Gary_M Classic ASP Databases 4 November 7th, 2003 11:03 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.