?
Solved

Sending dataBind data from a textbox to an Acess DB

Posted on 2005-03-20
1
Medium Priority
?
259 Views
Last Modified: 2010-04-17
What I have done is created a "customer screen" with all kinds of textboxes and using:

custFName.DataBindings.Add("Text",dsCustomer1,"Customer.customerFirstName");

dsCustomer1 being my dataset and "Customer.customerFirstname" being my data member in the DB

I have the form loading ok and my navagation is great but I cannot send the infomation back to the Acess DB

The code i am using is as follows:
if (dsCustomer1.HasChanges())
                  {
                        DataSet dsNew = new DataSet();
                        dsCustomer1.AcceptChanges();
                        dsCustomer1.Merge(dsNew);
                        adapterCustomer.Update(dsCustomer1);
                        MessageBox.Show("Updated");
                        BindData(); // I use this to reload the ds
                  }
                  else
                  {
                        MessageBox.Show("Nothing to Save");
                  }


can anyone help me?
0
Comment
Question by:Socrates2k1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 14

Accepted Solution

by:
nayernaguib earned 2000 total points
ID: 13588862
Try following code:

if (dsCustomer1.HasChanges())
               {
                    adapterCustomer.Update(dsCustomer1);
                    dsCustomer1.AcceptChanges();
                    MessageBox.Show("Updated");
                    BindData(); // I use this to reload the ds
               }
               else
               {
                    MessageBox.Show("Nothing to Save");
               }

_________________

  Nayer Naguib
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question