Advertisement

04.21.2008 at 09:00AM PDT, ID: 23340036
[x]
Attachment Details

How do I assign the updateCommand for an inner join?

Asked by retrobot in Microsoft Visual C#.Net, C# Programming Language, SQL Server 2005

Tags: c#

I have a dataset populated via inner join as attached.
It works as a view but I understand that in order to call the update function for the dataset, I will need to assign the updateCommand on the adaptor. (I believe I will also need one adaptor per DataTable i.e.2).
My question; how do I achieve this?Start Free Trial
1:
2:
3:
4:
5:
6:
myConnection = new SqlConnection("Data Source=MRSMITH-PC\\SQLEXPRESS;Initial Catalog=GustoEmp;Integrated Security=True");
dsEmployees = new DataSet();
daEmployees = new SqlDataAdapter("SELECT * FROM People INNER JOIN Employees ON People.EmployeeID=Employees.ID", myConnection);
daEmployees.Fill(dsEmployees, "emps");
this.Grid_People.DataSource = dsEmployees;
this.Dg_People.DataMember = "emps";
[+][-]04.21.2008 at 09:27AM PDT, ID: 21403530

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.

 
[+][-]04.21.2008 at 10:39AM PDT, ID: 21404165

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.

 
[+][-]04.21.2008 at 04:56PM PDT, ID: 21407172

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.

 
[+][-]04.21.2008 at 05:14PM PDT, ID: 21407270

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.

 
[+][-]04.22.2008 at 01:29AM PDT, ID: 21408999

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.

 
[+][-]04.22.2008 at 06:17AM PDT, ID: 21410781

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 C#.Net, C# Programming Language, SQL Server 2005
Tags: c#
Sign Up Now!
Solution Provided By: Nash2334
Participating Experts: 2
Solution Grade: A
 
 
[+][-]04.22.2008 at 06:18AM PDT, ID: 21410785

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.

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