rwheeler23
asked on
VS C# and only committing records that have a value in a certain column
Using VS C# I populate a dataset and then using a data grid view I display a grid on the screen. There 8 columns and 12 rows displayed at once. The first column is the most significant. In this case it is a job number. Right now when this code is executed all records are committed to the database. My question is this. Is there a way to only write the records that have a job number? In other words is there a way to filter the committed records to only be the records that have a value for job number? Should I not be using command builder? I could provide additional code if that would be helpful.
try
{
_commandBuilder.GetUpdateC ommand();
DistDataAdapter.Update(Dis tDataSet);
}
catch (Exception ex)
{
string eMsg = "View-JL-004: ERROR: " + ex.Message;
if (Model.stackTraceWanted) eMsg += "\n" + ex.StackTrace;
MessageBox.Show(eMsg);
}
try
{
_commandBuilder.GetUpdateC
DistDataAdapter.Update(Dis
}
catch (Exception ex)
{
string eMsg = "View-JL-004: ERROR: " + ex.Message;
if (Model.stackTraceWanted) eMsg += "\n" + ex.StackTrace;
MessageBox.Show(eMsg);
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER