C# - Visual Studio 2010 - mssql 2008R2 .net 4.0....


I have a form, on the form I have text boxes, I have successfully bound the text boxes to data fields. I can change the dataset and update the dataset. All of that was fairly simple.

I cannot figure out how to update a field in the dataset that isn't bound to a control.

For instance, the Query for the main form is....

SELECT TOP (100) PERCENT DT.DTMainTable.DTLine, DT.DTMainTable.DTRobot, DT.DTMainTable.DTSolution, DT.DTMainTable.DTResponsibility,
DT.DTMainTable.DTTimeDown, DT.DTMainTable.DTTimeUp, DT.DTMainTable.DTMinutes, DT.DTMainTable.DTMalfunction,
DT.DTMainTable.DTLongTerm, DT.DTMainTable.DTTimeDown1, DT.DTMainTable.DTTimeUp2, COM.ResponsibleParty.RPID,
COM.ResponsibleParty.RPName, DT.T3Code.T3CodeName, DT.DTMainTable.DTT3Code, DT.T2Code.T2CodeName, DT.T1Code.T1CodeName,
DT.DTMainTable.DTID, COM.MachineList.MLARGNUMBER, COM.MachineList.MLPRINTID, COM.MachineList.MLCELLNAME,
COM.MachineList.MLSATASSIGN, COM.MachineList.MLID, COM.MachineList.MLLINEID,
COM.MachineList.MLCELLNAME + COM.MachineList.MLARGNUMBER AS ARGName, DT.T2Code.T2ID, DT.T1Code.T1ID, DT.T3Code.T3ID,
DT.DTMainTable.DTNoTime, DT.DTMainTable.TotalMinutes, DT.DTMainTable.DTOriginator, COM.TeamMemberPop.TeamMembers,
EQP.ProcNumbers.PROCNUMBER, COM.areaassignments.AAareaname, COM.areaassignments.AAID
FROM COM.areaassignments RIGHT OUTER JOIN
COM.MachineList ON COM.areaassignments.AAID = COM.MachineList.MLSATASSIGN RIGHT OUTER JOIN
COM.TeamMemberPop RIGHT OUTER JOIN
DT.DTMainTable ON COM.TeamMemberPop.TMID = DT.DTMainTable.DTOriginator LEFT OUTER JOIN
EQP.ProcNumbers ON DT.DTMainTable.DTRobot = EQP.ProcNumbers.PROCID LEFT OUTER JOIN
DT.T1Code RIGHT OUTER JOIN
DT.T2Code ON DT.T1Code.T1ID = DT.T2Code.T2T1CodeLink RIGHT OUTER JOIN
DT.T3Code ON DT.T2Code.T2ID = DT.T3Code.T2CodeLink ON DT.DTMainTable.DTT3Code = DT.T3Code.T3ID ON
COM.MachineList.MLID = DT.DTMainTable.DTLine LEFT OUTER JOIN
COM.ResponsibleParty ON DT.DTMainTable.DTResponsibility = COM.ResponsibleParty.RPID
ORDER BY DT.DTMainTable.DTID

On my main form, the Originator is displayed as a the text field 'TeamMembers'. I also have a combo box that reads the list of Team Members from the COM.TeamMemberPop table so you can modify the team member responsible.

Now... to change the originator the value that needs to be modified is the DTOriginator field in the main table which is an interger field which references the indentity column in the TeamMemberPop View. I can do this by creating another text box and link it to the DTOriginator field and then move data in and out. This seems to be a bit around the block the long way.

What I want to know is how to access the information in a field in code without having to link it to a control first.

In VB it was recordset!fieldname