|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Must be a better way to update or add using variable datato 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. -- Thanks, Jim Jim,
I have to few information to give a complete answer. However a dataset has this format dataset.tables(TableNumberCollection).Rows(RowNumberCollection).Items(xxCollection) This is not strongly typed. Strongly Typed you will see it by instance as (where it is different in the STD versions 1.x and 2.0) dataset.MyTable.Rows(Rownumber)(Columname) That are the places to update. I hope that this gives an idea Cor
control arrays
Put standard output into file Spell checker howto make a console app start with window minimized How can you add a custom user control to a datagridview? modal dialog box Running app on Shared Drive Export from VB.NET 2003 to an Excel spreadsheet Pointer in a structure Datagrid Plus Sign Event |
|||||||||||||||||||||||