Advertisement

12.13.2007 at 01:52PM PST, ID: 23022296
[x]
Attachment Details

BindingSource AddNew

Asked by LKearney in Microsoft Visual Basic.Net, .NET, Microsoft Visual C#.Net

Tags: ,

Hi Thanks for clicking

We are looking to utilise the new BindingSource Data Object supplied in ADO.NET2.

We have BindingSource binding to a table, Tbl_Engineer fine. Our Form has several Textboxes bound to this table by using the BindingSource. The Textboxes take on the data correctly.

We can even Save and write back to the database by clicking a Save button that runs this code

Me.Validate()            
Me.bindingSource1.EndEdit()
Me.daSQLEngineer.Update(Me.dsSQLEngineer.Tbl_Engineer)

However, we would also like to add to the Table, therefore we have added a New Button

In the new button event we do this BindingSource1.AddNew(). It clears all fields ready for entry!!!

Upon clicking the Save button, it runs the same code that code as above, without the EndEdit in place (I removed EndEdit for testing purposes)

It doesn't crash, but it doesn't add a new record into Tbl_Engineer

Anybody offer any help on this BindingSource AddNew method??Start Free Trial
[+][-]12.13.2007 at 01:56PM PST, ID: 20468073

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Visual Basic.Net, .NET, Microsoft Visual C#.Net
Tags: bindingsource, addnew
Sign Up Now!
Solution Provided By: p_davis
Participating Experts: 1
Solution Grade: B
 
 
[+][-]12.13.2007 at 01:58PM PST, ID: 20468089

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.13.2007 at 01:59PM PST, ID: 20468108

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.14.2007 at 04:10AM PST, ID: 20471015

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.14.2007 at 05:03AM PST, ID: 20471228

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.14.2007 at 05:11AM PST, ID: 20471261

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.14.2007 at 05:30AM PST, ID: 20471350

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.14.2007 at 05:34AM PST, ID: 20471368

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.14.2007 at 05:39AM PST, ID: 20471387

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.14.2007 at 05:41AM PST, ID: 20471402

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.14.2007 at 05:44AM PST, ID: 20471419

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.14.2007 at 06:09AM PST, ID: 20471543

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.14.2007 at 06:20AM PST, ID: 20471623

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.14.2007 at 06:21AM PST, ID: 20471627

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.14.2007 at 12:06PM PST, ID: 20474059

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628