Computer Information Science Programming 370 and 371
Table Adapter and Binding Source Commands
Version 1.0
NOTE:
Items shown in Bold Italic must be modified to match the names used in the program or the database table.
Add a Record
(This command will automatically clear all bound controls.)
BindingSourceName.AddNew()
Cancel an Add or Edit Process
BindingSourceName.CancelEdit()
DatasetName.RejectChanges()
Delete a Record
BindingSourceName.RemoveCurrent()
TableAdapterName.Update(DatasetName) for single table datasets
TableAdapterManagerName.UpdateAll(DatasetName) for multiple table datasets
Fill a Dataset
TableAdapterName.Fill(DatasetName.TableName)
Fill a Dataset using a parameterized query
TableAdapterName.Fill(DatasetName.TableName, "SearchValue")
Find and Display a Record
recordPosition = BindingSourceName.Find("FieldName","SearchValue")
BindingSourceName.Position = recordPosition
Move One Record Backward
BindingSourceName.MovePrevious()
Move One Record Forward
BindingSourceName.MoveNext()
Move to a Specific Record
BindingSourceName.Position = recordNumber
Move to the Beginning of the File
BindingSourceName.MoveFirst()
Move to the End of the File
BindingSourceName.MoveLast()
Record Count
recordCount = BindingSourceName.Count()
Sort the Dataset
BindingSourceName.Sort = "Field Name"
Update a Record After an Add or Edit Process has been started
BindingSourceName.EndEdit()
TableAdapterName.Update(DatasetName) for single table datasets
TableAdapterManagerName.UpdateAll(DatasetName) for multiple table datasets