Hi-
I have an update to a row where I'm updating several fields, one of them being a boolean / bit. All of the other rows update fine. The boolean field doesn't update.
Any thoughts?
TIA!
Here is the code I'm using:
TblVehicle t = new TblVehicle();
if (bolAdd == false)
{
//doing this to work around bug for updates
t.IsNew = false;
t.MarkOld();
t.IsLoaded = true;
t.VehicleID = intVehicleID; //primary key
}
t.VehicleCategoryID = Convert.ToInt16(cboCategory.SelectedValue);
t.VehicleLocationID = Convert.ToInt16(cboLocation.SelectedValue);
t.VehicleUnitNumber = txtUnitName.Text;
t.VehicleYear = Convert.ToInt16(txtYear.Text);
t.VehicleMake = txtMake.Text;
t.VehicleModel = txtModel.Text ;
t.VehicleCapacity = Convert.ToInt16(txtCapacity.Text);
t.VehicleNotes = txtNotes.Text;
//********** here is the section I'm having issues with
// t.VehicleActive = Convert.ToBoolean(cbActive.Checked);
t.VehicleActive = false;
t.LastModBy = clsGlobals.gstrCurrentUser;
t.LastModDate = DateTime.Now;
t.Save(clsGlobals.gstrCurrentUser);
MessageBox.Show("Record Saved", clsGlobals.gstrApplicationName);