G
Guest
Using VS 2005. I have bound fields on a form bound to a dataset(s) and I want
to add various data elements to fields in the DB that are not comming from
bound fields. This is what I have resorted to and it's not very efficient.
Any suggestions would be greatly appreciated
daPtName.InsertCommand.Parameters.Item("@Fname").Value = txtFname.Text
daPtName.InsertCommand.Parameters.Item("@Mname").Value = txtMname.Text
daPtName.InsertCommand.Parameters.Item("@Lname").Value = txtLname.Text
daPtName.InsertCommand.Parameters.Item("@PFullName").Value =
txtFullName.Text
daPtName.InsertCommand.Parameters.Item("@LFMName").Value = LFMName
daPtName.InsertCommand.Parameters.Item("@SurgeonNo").Value = SurgeonNo
daPtName.InsertCommand.Parameters.Item("@Title").Value = cboTitle.Text
daPtName.InsertCommand.ExecuteNonQuery()
Also if I could make this a universal function that accepts any
dataadapter/dataset and allows me to access the un bound data for update or
addition would be great.
to add various data elements to fields in the DB that are not comming from
bound fields. This is what I have resorted to and it's not very efficient.
Any suggestions would be greatly appreciated
daPtName.InsertCommand.Parameters.Item("@Fname").Value = txtFname.Text
daPtName.InsertCommand.Parameters.Item("@Mname").Value = txtMname.Text
daPtName.InsertCommand.Parameters.Item("@Lname").Value = txtLname.Text
daPtName.InsertCommand.Parameters.Item("@PFullName").Value =
txtFullName.Text
daPtName.InsertCommand.Parameters.Item("@LFMName").Value = LFMName
daPtName.InsertCommand.Parameters.Item("@SurgeonNo").Value = SurgeonNo
daPtName.InsertCommand.Parameters.Item("@Title").Value = cboTitle.Text
daPtName.InsertCommand.ExecuteNonQuery()
Also if I could make this a universal function that accepts any
dataadapter/dataset and allows me to access the un bound data for update or
addition would be great.