0
Reply

Tableadapter Help

David Smith

David Smith

Feb 22 2013 2:34 PM
883
I am not forsure why the logic below is not saving the data to the database. I have a grid that has a assigned datasource and a assigned datamember, when I execute the code below, the data is not saving to the database. Can someone help me. I am using the dataset designer.

  generalDataSet.AcceptChanges();
            tmpContactScheduleGeneralTableAdapter1.ClearBeforeFill = true;
            int test = tmpContactScheduleGeneralTableAdapter1.UpdateTemporaryScheduleTable(].approvedPersonnelUser.ID, DateTime.Now, approvedPersonnelUser.ID, DateTime.Now);
            Console.WriteLine(test.ToString());
            tmpContactScheduleGeneralTableAdapter1.Fill(generalDataSet.tmpContactSchedule);
            tmpContactScheduleGeneralTableAdapter1.Update(generalDataSet);