|
' IMPORTANT! Being new to .NET, I've left many of the Inherits out soz to
' learn what's what and what's where.
Public Class frmMain
Inherits System.Windows.Forms.Form
'
' ADO.NET "A BETTER EXAMPLE"
' Demonstrates ADO.NET ADD - CHANGE - UPDATE - DELETE when used with
' Bound/Unbound Data as well as the MS Windows Forms DataGrid (*not* the
' Windows web-enabled DataGrid).
'
' I hope this helps. It's pretty raw, but functional... since there's no real
' super examples on the net or for that matter in any of the books I've
' been reading (maybe I should buy the *advanced books*).
' You need 'PhoneBook.mdb' to be in your application path.'
' The path of PhoneBook.mdb should be alright. If it isn't simply adjust the
' connection strings and so fourth.
' Send beer money to [[Email Removed]]
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
' Does this .NET look like Delphi or am I crazy?
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents bofDataGrid As System.Windows.Forms.GroupBox
Friend WithEvents dg As System.Windows.Forms.DataGrid
Friend WithEvents bofManual As System.Windows.Forms.GroupBox
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents Label6 As System.Windows.Forms.Label
Friend WithEvents Label7 As System.Windows.Forms.Label
Friend WithEvents OleDbSelectCommand1 As System.Data.OleDb.OleDbCommand
Friend WithEvents OleDbInsertCommand1 As System.Data.OleDb.OleDbCommand
Friend WithEvents OleDbUpdateCommand1 As System.Data.OleDb.OleDbCommand
Friend WithEvents OleDbDeleteCommand1 As System.Data.OleDb.OleDbCommand
Friend WithEvents btnUseBoundControls As System.Windows.Forms.Button
Friend WithEvents Label8 As System.Windows.Forms.Label
Friend WithEvents Label9 As System.Windows.Forms.Label
Friend WithEvents Label10 As System.Windows.Forms.Label
Friend WithEvents Label11 As System.Windows.Forms.Label
Friend WithEvents Label12 As System.Windows.Forms.Label
Friend WithEvents Label13 As System.Windows.Forms.Label
Friend WithEvents Label14 As System.Windows.Forms.Label
Friend WithEvents btnDataGridUpdate As System.Windows.Forms.Button
Friend WithEvents WizardBound_OleDbDataAdapter As System.Data.OleDb.OleDbDataAdapter
Friend WithEvents WizardBound_OleDbConnection As System.Data.OleDb.OleDbConnection
Friend WithEvents btnWizardBoundUpdate As System.Windows.Forms.Button
Friend WithEvents WizardBound_DataSet As PhoneBook.DataSet1
Friend WithEvents txtWizardBoundWorkPhone As System.Windows.Forms.TextBox
Friend WithEvents txtWizardBoundHomePhone As System.Windows.Forms.TextBox
Friend WithEvents txtWizardBoundZip As System.Windows.Forms.TextBox
Friend WithEvents txtWizardBoundState As System.Windows.Forms.TextBox
Friend WithEvents txtWizardBoundCity As System.Windows.Forms.TextBox
Friend WithEvents txtWizardBoundAddress As System.Windows.Forms.TextBox
Friend WithEvents txtWizardBoundName As System.Windows.Forms.TextBox
Friend WithEvents lblInfo As System.Windows.Forms.Label
Friend WithEvents btnWizardBoundNext As System.Windows.Forms.Button
Friend WithEvents btnWizardBoundPrevious As System.Windows.Forms.Button
Friend WithEvents btnDataGridPrevious As System.Windows.Forms.Button
Friend WithEvents btnDataGridNext As System.Windows.Forms.Button
Friend WithEvents btnDataGridUse As System.Windows.Forms.Button
Friend WithEvents btnManualPrevious As System.Windows.Forms.Button
Friend WithEvents btnManualNext As System.Windows.Forms.Button
Friend WithEvents btnManualUse As System.Windows.Forms.Button
Friend WithEvents btnManualUpdate As System.Windows.Forms.Button
Friend WithEvents lblTitle01 As System.Windows.Forms.Label
Friend WithEvents Label15 As System.Windows.Forms.Label
Friend WithEvents Label16 As System.Windows.Forms.Label
Friend WithEvents Label17 As System.Windows.Forms.Label
Friend WithEvents Label18 As System.Windows.Forms.Label
Friend WithEvents Label19 As System.Windows.Forms.Label
Friend WithEvents txtManualState As System.Windows.Forms.TextBox
Friend WithEvents txtManualWorkPhone As System.Windows.Forms.TextBox
Friend WithEvents txtManualHomePhone As System.Windows.Forms.TextBox
Friend WithEvents txtManualZip As System.Windows.Forms.TextBox
Friend WithEvents txtManualAddress As System.Windows.Forms.TextBox
Friend WithEvents txtManualName As System.Windows.Forms.TextBox
Friend WithEvents bofWizardBoundControls As System.Windows.Forms.GroupBox
Friend WithEvents txtManualCity As System.Windows.Forms.TextBox
Friend WithEvents btnManualAdd As System.Windows.Forms.Button
Friend WithEvents btnDataGridDel As System.Windows.Forms.Button
Friend WithEvents btnDataGridEdit As System.Windows.Forms.Button
Friend WithEvents btnManualDel As System.Windows.Forms.Button
Friend WithEvents btnWizardBoundAdd As System.Windows.Forms.Button
Friend WithEvents btnWizardBoundDel As System.Windows.Forms.Button
Friend WithEvents Label20 As System.Windows.Forms.Label
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.bofDataGrid = New System.Windows.Forms.GroupBox()
Me.btnDataGridEdit = New System.Windows.Forms.Button()
Me.btnDataGridDel = New System.Windows.Forms.Button()
Me.btnDataGridPrevious = New System.Windows.Forms.Button()
Me.btnDataGridNext = New System.Windows.Forms.Button()
Me.btnDataGridUpdate = New System.Windows.Forms.Button()
Me.btnDataGridUse = New System.Windows.Forms.Button()
Me.dg = New System.Windows.Forms.DataGrid()
Me.bofManual = New System.Windows.Forms.GroupBox()
Me.btnManualAdd = New System.Windows.Forms.Button()
Me.btnManualDel = New System.Windows.Forms.Button()
Me.btnManualUpdate = New System.Windows.Forms.Button()
Me.btnManualPrevious = New System.Windows.Forms.Button()
Me.btnManualNext = New System.Windows.Forms.Button()
Me.txtManualState = New System.Windows.Forms.TextBox()
Me.txtManualWorkPhone = New System.Windows.Forms.TextBox()
Me.txtManualHomePhone = New System.Windows.Forms.TextBox()
Me.txtManualZip = New System.Windows.Forms.TextBox()
Me.txtManualCity = New System.Windows.Forms.TextBox()
Me.txtManualAddress = New System.Windows.Forms.TextBox()
Me.Label7 = New System.Windows.Forms.Label()
Me.Label6 = New System.Windows.Forms.Label()
Me.Label5 = New System.Windows.Forms.Label()
Me.Label4 = New System.Windows.Forms.Label()
Me.Label3 = New System.Windows.Forms.Label()
Me.Label2 = New System.Windows.Forms.Label()
Me.Label1 = New System.Windows.Forms.Label()
Me.txtManualName = New System.Windows.Forms.TextBox()
Me.btnManualUse = New System.Windows.Forms.Button()
Me.WizardBound_OleDbDataAdapter = New System.Data.OleDb.OleDbDataAdapter()
Me.OleDbDeleteCommand1 = New System.Data.OleDb.OleDbCommand()
Me.WizardBound_OleDbConnection = New System.Data.OleDb.OleDbConnection()
Me.OleDbInsertCommand1 = New System.Data.OleDb.OleDbCommand()
Me.OleDbSelectCommand1 = New System.Data.OleDb.OleDbCommand()
Me.OleDbUpdateCommand1 = New System.Data.OleDb.OleDbCommand()
Me.WizardBound_DataSet = New PhoneBook.DataSet1()
Me.bofWizardBoundControls = New System.Windows.Forms.GroupBox()
Me.btnWizardBoundAdd = New System.Windows.Forms.Button()
Me.btnWizardBoundDel = New System.Windows.Forms.Button()
Me.btnWizardBoundUpdate = New System.Windows.Forms.Button()
Me.btnWizardBoundNext = New System.Windows.Forms.Button()
Me.btnWizardBoundPrevious = New System.Windows.Forms.Button()
Me.txtWizardBoundWorkPhone = New System.Windows.Forms.TextBox()
Me.txtWizardBoundHomePhone = New System.Windows.Forms.TextBox()
Me.txtWizardBoundZip = New System.Windows.Forms.TextBox()
Me.txtWizardBoundState = New System.Windows.Forms.TextBox()
Me.txtWizardBoundCity = New System.Windows.Forms.TextBox()
Me.txtWizardBoundAddress = New System.Windows.Forms.TextBox()
Me.Label8 = New System.Windows.Forms.Label()
Me.Label9 = New System.Windows.Forms.Label()
Me.Label10 = New System.Windows.Forms.Label()
Me.Label11 = New System.Windows.Forms.Label()
Me.Label12 = New System.Windows.Forms.Label()
Me.Label13 = New System.Windows.Forms.Label()
Me.Label14 = New System.Windows.Forms.Label()
Me.btnUseBoundControls = New System.Windows.Forms.Button()
Me.txtWizardBoundName = New System.Windows.Forms.TextBox()
Me.lblInfo = New System.Windows.Forms.Label()
Me.lblTitle01 = New System.Windows.Forms.Label()
Me.Label15 = New System.Windows.Forms.Label()
Me.Label16 = New System.Windows.Forms.Label()
Me.Label17 = New System.Windows.Forms.Label()
Me.Label18 = New System.Windows.Forms.Label()
Me.Label19 = New System.Windows.Forms.Label()
Me.Label20 = New System.Windows.Forms.Label()
Me.bofDataGrid.SuspendLayout()
CType(Me.dg, System.ComponentModel.ISupportInitialize).BeginInit()
Me.bofManual.SuspendLayout()
CType(Me.WizardBound_DataSet, System.ComponentModel.ISupportInitialize).BeginInit()
Me.bofWizardBoundControls.SuspendLayout()
Me.SuspendLayout()
'
'bofDataGrid
'
Me.bofDataGrid.Controls.AddRange(New System.Windows.Forms.Control() {Me.btnDataGridEdit, Me.btnDataGridDel, Me.btnDataGridPrevious, Me.btnDataGridNext, Me.btnDataGridUpdate, Me.btnDataGridUse, Me.dg})
Me.bofDataGrid.Location = New System.Drawing.Point(256, 200)
Me.bofDataGrid.Name = "bofDataGrid"
Me.bofDataGrid.Size = New System.Drawing.Size(256, 224)
Me.bofDataGrid.TabIndex = 1
Me.bofDataGrid.TabStop = False
Me.bofDataGrid.Text = "Windows Forms Data Grid Control"
'
'btnDataGridEdit
'
Me.btnDataGridEdit.Enabled = False
Me.btnDataGridEdit.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btnDataGridEdit.Location = New System.Drawing.Point(208, 192)
Me.btnDataGridEdit.Name = "btnDataGridEdit"
Me.btnDataGridEdit.Size = New System.Drawing.Size(40, 24)
Me.btnDataGridEdit.TabIndex = 31
Me.btnDataGridEdit.Text = "Edit"
'
'btnDataGridDel
'
Me.btnDataGridDel.Enabled = False
Me.btnDataGridDel.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btnDataGridDel.Location = New System.Drawing.Point(168, 192)
Me.btnDataGridDel.Name = "btnDataGridDel"
Me.btnDataGridDel.Size = New System.Drawing.Size(40, 24)
Me.btnDataGridDel.TabIndex = 30
Me.btnDataGridDel.Text = "Del"
'
'btnDataGridPrevious
'
Me.btnDataGridPrevious.Enabled = False
Me.btnDataGridPrevious.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btnDataGridPrevious.Location = New System.Drawing.Point(48, 192)
Me.btnDataGridPrevious.Name = "btnDataGridPrevious"
Me.btnDataGridPrevious.Size = New System.Drawing.Size(32, 24)
Me.btnDataGridPrevious.TabIndex = 27
Me.btnDataGridPrevious.Text = "<<"
'
'btnDataGridNext
'
Me.btnDataGridNext.Enabled = False
Me.btnDataGridNext.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btnDataGridNext.Location = New System.Drawing.Point(80, 192)
Me.btnDataGridNext.Name = "btnDataGridNext"
Me.btnDataGridNext.Size = New System.Drawing.Size(32, 24)
Me.btnDataGridNext.TabIndex = 26
Me.btnDataGridNext.Text = ">>"
'
'btnDataGridUpdate
'
Me.btnDataGridUpdate.Enabled = False
Me.btnDataGridUpdate.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btnDataGridUpdate.Location = New System.Drawing.Point(112, 192)
Me.btnDataGridUpdate.Name = "btnDataGridUpdate"
Me.btnDataGridUpdate.Size = New System.Drawing.Size(56, 24)
Me.btnDataGridUpdate.TabIndex = 4
Me.btnDataGridUpdate.Text = "Update"
'
'btnDataGridUse
'
Me.btnDataGridUse.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btnDataGridUse.Location = New System.Drawing.Point(8, 192)
Me.btnDataGridUse.Name = "btnDataGridUse"
Me.btnDataGridUse.Size = New System.Drawing.Size(40, 24)
Me.btnDataGridUse.TabIndex = 2
Me.btnDataGridUse.Text = "Use"
'
'dg
'
Me.dg.CaptionVisible = False
Me.dg.DataMember = ""
Me.dg.HeaderForeColor = System.Drawing.SystemColors.ControlText
Me.dg.Location = New System.Drawing.Point(8, 16)
Me.dg.Name = "dg"
Me.dg.ParentRowsVisible = False
Me.dg.ReadOnly = True
Me.dg.Size = New System.Drawing.Size(240, 168)
Me.dg.TabIndex = 1
Me.dg.Visible = False
'
'bofManual
'
Me.bofManual.Controls.AddRange(New System.Windows.Forms.Control() {Me.btnManualAdd, Me.btnManualDel, Me.btnManualUpdate, Me.btnManualPrevious, Me.btnManualNext, Me.txtManualState, Me.txtManualWorkPhone, Me.txtManualHomePhone, Me.txtManualZip, Me.txtManualCity, Me.txtManualAddress, Me.Label7, Me.Label6, Me.Label5, Me.Label4, Me.Label3, Me.Label2, Me.Label1, Me.txtManualName, Me.btnManualUse})
Me.bofManual.Location = New System.Drawing.Point(256, 0)
Me.bofManual.Name = "bofManual"
Me.bofManual.Size = New System.Drawing.Size(256, 200)
Me.bofManual.TabIndex = 2
Me.bofManual.TabStop = False
Me.bofManual.Text = "Manual (unbound data)"
'
'btnManualAdd
'
Me.btnManualAdd.Enabled = False
Me.btnManualAdd.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btnManualAdd.Location = New System.Drawing.Point(208, 168)
Me.btnManualAdd.Name = "btnManualAdd"
Me.btnManualAdd.Size = New System.Drawing.Size(40, 24)
Me.btnManualAdd.TabIndex = 29
Me.btnManualAdd.Text = "Add"
'
'btnManualDel
'
Me.btnManualDel.Enabled = False
Me.btnManualDel.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btnManualDel.Location = New System.Drawing.Point(168, 168)
Me.btnManualDel.Name = "btnManualDel"
Me.btnManualDel.Size = New System.Drawing.Size(40, 24)
Me.btnManualDel.TabIndex = 28
Me.btnManualDel.Text = "Del"
'
'btnManualUpdate
'
Me.btnManualUpdate.Enabled = False
Me.btnManualUpdate.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btnManualUpdate.Location = New System.Drawing.Point(112, 168)
Me.btnManualUpdate.Name = "btnManualUpdate"
Me.btnManualUpdate.Size = New System.Drawing.Size(56, 24)
Me.btnManualUpdate.TabIndex = 27
Me.btnManualUpdate.Text = "Update"
'
'btnManualPrevious
'
Me.btnManualPrevious.Enabled = False
Me.btnManualPrevious.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btnManualPrevious.Location = New System.Drawing.Point(48, 168)
Me.btnManualPrevious.Name = "btnManualPrevious"
Me.btnManualPrevious.Size = New System.Drawing.Size(32, 24)
Me.btnManualPrevious.TabIndex = 18
Me.btnManualPrevious.Text = "<<"
'
'btnManualNext
'
Me.btnManualNext.Enabled = False
Me.btnManualNext.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btnManualNext.Location = New System.Drawing.Point(80, 168)
Me.btnManualNext.Name = "btnManualNext"
Me.btnManualNext.Size = New System.Drawing.Size(32, 24)
Me.btnManualNext.TabIndex = 17
Me.btnManualNext.Text = ">>"
'
'txtManualState
'
Me.txtManualState.Location = New System.Drawing.Point(184, 72)
Me.txtManualState.Name = "txtManualState"
Me.txtManualState.Size = New System.Drawing.Size(64, 20)
Me.txtManualState.TabIndex = 16
Me.txtManualState.Text = ""
'
'txtManualWorkPhone
'
Me.txtManualWorkPhone.Location = New System.Drawing.Point(128, 136)
Me.txtManualWorkPhone.Name = "txtManualWorkPhone"
Me.txtManualWorkPhone.Size = New System.Drawing.Size(120, 20)
Me.txtManualWorkPhone.TabIndex = 15
Me.txtManualWorkPhone.Text = ""
'
'txtManualHomePhone
'
Me.txtManualHomePhone.Location = New System.Drawing.Point(128, 112)
Me.txtManualHomePhone.Name = "txtManualHomePhone"
Me.txtManualHomePhone.Size = New System.Drawing.Size(120, 20)
Me.txtManualHomePhone.TabIndex = 14
Me.txtManualHomePhone.Text = ""
'
'txtManualZip
'
Me.txtManualZip.Location = New System.Drawing.Point(160, 88)
Me.txtManualZip.Name = "txtManualZip"
Me.txtManualZip.Size = New System.Drawing.Size(88, 20)
Me.txtManualZip.TabIndex = 13
Me.txtManualZip.Text = ""
'
'txtManualCity
'
Me.txtManualCity.Location = New System.Drawing.Point(120, 48)
Me.txtManualCity.Name = "txtManualCity"
Me.txtManualCity.Size = New System.Drawing.Size(128, 20)
Me.txtManualCity.TabIndex = 12
Me.txtManualCity.Text = ""
'
'txtManualAddress
'
Me.txtManualAddress.Location = New System.Drawing.Point(120, 32)
Me.txtManualAddress.Name = "txtManualAddress"
Me.txtManualAddress.Size = New System.Drawing.Size(128, 20)
Me.txtManualAddress.TabIndex = 11
Me.txtManualAddress.Text = ""
'
'Label7
'
Me.Label7.Location = New System.Drawing.Point(16, 136)
Me.Label7.Name = "Label7"
Me.Label7.Size = New System.Drawing.Size(104, 16)
Me.Label7.TabIndex = 10
Me.Label7.Text = "Work Phone"
'
'Label6
'
Me.Label6.Location = New System.Drawing.Point(16, 112)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(104, 16)
Me.Label6.TabIndex = 9
Me.Label6.Text = "Home Phone"
'
'Label5
'
Me.Label5.Location = New System.Drawing.Point(16, 88)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(104, 16)
Me.Label5.TabIndex = 8
Me.Label5.Text = "Zip"
'
'Label4
'
Me.Label4.Location = New System.Drawing.Point(16, 72)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(104, 16)
Me.Label4.TabIndex = 7
Me.Label4.Text = "State"
'
'Label3
'
Me.Label3.Location = New System.Drawing.Point(16, 56)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(104, 16)
Me.Label3.TabIndex = 6
Me.Label3.Text = "City"
'
'Label2
'
Me.Label2.Location = New System.Drawing.Point(16, 40)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(104, 16)
Me.Label2.TabIndex = 5
Me.Label2.Text = "Address"
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(16, 24)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(104, 16)
Me.Label1.TabIndex = 4
Me.Label1.Text = "Name"
'
'txtManualName
'
Me.txtManualName.Location = New System.Drawing.Point(120, 16)
Me.txtManualName.Name = "txtManualName"
Me.txtManualName.Size = New System.Drawing.Size(128, 20)
Me.txtManualName.TabIndex = 3
Me.txtManualName.Text = ""
'
'btnManualUse
'
Me.btnManualUse.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btnManualUse.Location = New System.Drawing.Point(8, 168)
Me.btnManualUse.Name = "btnManualUse"
Me.btnManualUse.Size = New System.Drawing.Size(40, 24)
Me.btnManualUse.TabIndex = 2
Me.btnManualUse.Text = "Use"
'
'WizardBound_OleDbDataAdapter
'
Me.WizardBound_OleDbDataAdapter.DeleteCommand = Me.OleDbDeleteCommand1
Me.WizardBound_OleDbDataAdapter.InsertCommand = Me.OleDbInsertCommand1
Me.WizardBound_OleDbDataAdapter.SelectCommand = Me.OleDbSelectCommand1
Me.WizardBound_OleDbDataAdapter.TableMappings.AddRange(New System.Data.Common.DataTableMapping() {New System.Data.Common.DataTableMapping("Table", "Contacts", New System.Data.Common.DataColumnMapping() {New System.Data.Common.DataColumnMapping("ContactID", "ContactID"), New System.Data.Common.DataColumnMapping("Name", "Name"), New System.Data.Common.DataColumnMapping("Address", "Address") |