Help Using Update method

Thom1109

New member
Joined
Feb 10, 2006
Messages
3
Programming Experience
10+
Here's some code the form wizard generated in Vstudio 2005. The update method doesn't do anything. I know all my connections are right because the fill method works. Help?

Public Class frmRSMs

Private Sub TblRSMsBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TblRSMsBindingNavigatorSaveItem.Click
Me.Validate()
Me.TblRSMsBindingSource.EndEdit()
Me.TblRSMsTableAdapter.Update(Me.DsRSMs.tblRSMs)
End Sub

Private Sub frmRSMs_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.TblRSMsTableAdapter.Fill(Me.DsRSMs.tblRSMs)
End Sub

End Class

The fill method works, but the update does nothing. Is there some simple oversight here? All of the proper commands are in the dataset definition as pasted below:

'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:2.0.50727.42
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict Off
Option Explicit On
Imports System

<System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
Serializable(), _
System.ComponentModel.DesignerCategoryAttribute("code"), _
System.ComponentModel.ToolboxItem(true), _
System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema"), _
System.Xml.Serialization.XmlRootAttribute("dsRSMs"), _
System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")> _
Partial Public Class dsRSMs
Inherits System.Data.DataSet

Private tabletblRSMs As tblRSMsDataTable

Private _schemaSerializationMode As System.Data.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Sub New()
MyBase.New
Me.BeginInit
Me.InitClass
Dim schemaChangedHandler As System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
AddHandler MyBase.Tables.CollectionChanged, schemaChangedHandler
AddHandler MyBase.Relations.CollectionChanged, schemaChangedHandler
Me.EndInit
End Sub

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Protected Sub New(ByVal info As System.Runtime.Serialization.SerializationInfo, ByVal context As System.Runtime.Serialization.StreamingContext)
MyBase.New(info, context, false)
If (Me.IsBinarySerialized(info, context) = true) Then
Me.InitVars(false)
Dim schemaChangedHandler1 As System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
AddHandler Me.Tables.CollectionChanged, schemaChangedHandler1
AddHandler Me.Relations.CollectionChanged, schemaChangedHandler1
Return
End If
Dim strSchema As String = CType(info.GetValue("XmlSchema", GetType(String)),String)
If (Me.DetermineSchemaSerializationMode(info, context) = System.Data.SchemaSerializationMode.IncludeSchema) Then
Dim ds As System.Data.DataSet = New System.Data.DataSet
ds.ReadXmlSchema(New System.Xml.XmlTextReader(New System.IO.StringReader(strSchema)))
If (Not (ds.Tables("tblRSMs")) Is Nothing) Then
MyBase.Tables.Add(New tblRSMsDataTable(ds.Tables("tblRSMs")))
End If
Me.DataSetName = ds.DataSetName
Me.Prefix = ds.Prefix
Me.Namespace = ds.Namespace
Me.Locale = ds.Locale
Me.CaseSensitive = ds.CaseSensitive
Me.EnforceConstraints = ds.EnforceConstraints
Me.Merge(ds, false, System.Data.MissingSchemaAction.Add)
Me.InitVars
Else
Me.ReadXmlSchema(New System.Xml.XmlTextReader(New System.IO.StringReader(strSchema)))
End If
Me.GetSerializationData(info, context)
Dim schemaChangedHandler As System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
AddHandler MyBase.Tables.CollectionChanged, schemaChangedHandler
AddHandler Me.Relations.CollectionChanged, schemaChangedHandler
End Sub

<System.Diagnostics.DebuggerNonUserCodeAttribute(), _
System.ComponentModel.Browsable(false), _
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)> _
Public ReadOnly Property tblRSMs() As tblRSMsDataTable
Get
Return Me.tabletblRSMs
End Get
End Property

<System.Diagnostics.DebuggerNonUserCodeAttribute(), _
System.ComponentModel.BrowsableAttribute(true), _
System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Visible)> _
Public Overrides Property SchemaSerializationMode() As System.Data.SchemaSerializationMode
Get
Return Me._schemaSerializationMode
End Get
Set
Me._schemaSerializationMode = value
End Set
End Property

<System.Diagnostics.DebuggerNonUserCodeAttribute(), _
System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _
Public Shadows ReadOnly Property Tables() As System.Data.DataTableCollection
Get
Return MyBase.Tables
End Get
End Property

<System.Diagnostics.DebuggerNonUserCodeAttribute(), _
System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _
Public Shadows ReadOnly Property Relations() As System.Data.DataRelationCollection
Get
Return MyBase.Relations
End Get
End Property

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Protected Overrides Sub InitializeDerivedDataSet()
Me.BeginInit
Me.InitClass
Me.EndInit
End Sub

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Overrides Function Clone() As System.Data.DataSet
Dim cln As dsRSMs = CType(MyBase.Clone,dsRSMs)
cln.InitVars
cln.SchemaSerializationMode = Me.SchemaSerializationMode
Return cln
End Function

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Protected Overrides Function ShouldSerializeTables() As Boolean
Return false
End Function

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Protected Overrides Function ShouldSerializeRelations() As Boolean
Return false
End Function

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Protected Overrides Sub ReadXmlSerializable(ByVal reader As System.Xml.XmlReader)
If (Me.DetermineSchemaSerializationMode(reader) = System.Data.SchemaSerializationMode.IncludeSchema) Then
Me.Reset
Dim ds As System.Data.DataSet = New System.Data.DataSet
ds.ReadXml(reader)
If (Not (ds.Tables("tblRSMs")) Is Nothing) Then
MyBase.Tables.Add(New tblRSMsDataTable(ds.Tables("tblRSMs")))
End If
Me.DataSetName = ds.DataSetName
Me.Prefix = ds.Prefix
Me.Namespace = ds.Namespace
Me.Locale = ds.Locale
Me.CaseSensitive = ds.CaseSensitive
Me.EnforceConstraints = ds.EnforceConstraints
Me.Merge(ds, false, System.Data.MissingSchemaAction.Add)
Me.InitVars
Else
Me.ReadXml(reader)
Me.InitVars
End If
End Sub

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Protected Overrides Function GetSchemaSerializable() As System.Xml.Schema.XmlSchema
Dim stream As System.IO.MemoryStream = New System.IO.MemoryStream
Me.WriteXmlSchema(New System.Xml.XmlTextWriter(stream, Nothing))
stream.Position = 0
Return System.Xml.Schema.XmlSchema.Read(New System.Xml.XmlTextReader(stream), Nothing)
End Function

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Friend Overloads Sub InitVars()
Me.InitVars(true)
End Sub

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Friend Overloads Sub InitVars(ByVal initTable As Boolean)
Me.tabletblRSMs = CType(MyBase.Tables("tblRSMs"),tblRSMsDataTable)
If (initTable = true) Then
If (Not (Me.tabletblRSMs) Is Nothing) Then
Me.tabletblRSMs.InitVars
End If
End If
End Sub

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Private Sub InitClass()
Me.DataSetName = "dsRSMs"
Me.Prefix = ""
Me.Namespace = "http://tempuri.org/dsRSMs.xsd"
Me.EnforceConstraints = true
Me.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
Me.tabletblRSMs = New tblRSMsDataTable
MyBase.Tables.Add(Me.tabletblRSMs)
End Sub

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Private Function ShouldSerializetblRSMs() As Boolean
Return false
End Function

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Private Sub SchemaChanged(ByVal sender As Object, ByVal e As System.ComponentModel.CollectionChangeEventArgs)
If (e.Action = System.ComponentModel.CollectionChangeAction.Remove) Then
Me.InitVars
End If
End Sub

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Shared Function GetTypedDataSetSchema(ByVal xs As System.Xml.Schema.XmlSchemaSet) As System.Xml.Schema.XmlSchemaComplexType
Dim ds As dsRSMs = New dsRSMs
Dim type As System.Xml.Schema.XmlSchemaComplexType = New System.Xml.Schema.XmlSchemaComplexType
Dim sequence As System.Xml.Schema.XmlSchemaSequence = New System.Xml.Schema.XmlSchemaSequence
xs.Add(ds.GetSchemaSerializable)
Dim any As System.Xml.Schema.XmlSchemaAny = New System.Xml.Schema.XmlSchemaAny
any.Namespace = ds.Namespace
sequence.Items.Add(any)
type.Particle = sequence
Return type
End Function

Public Delegate Sub tblRSMsRowChangeEventHandler(ByVal sender As Object, ByVal e As tblRSMsRowChangeEvent)

<System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
System.Serializable(), _
System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
Partial Public Class tblRSMsDataTable
Inherits System.Data.DataTable
Implements System.Collections.IEnumerable

Private columnRSMId As System.Data.DataColumn

Private columnlName As System.Data.DataColumn

Private columnfName As System.Data.DataColumn

Private columnphone As System.Data.DataColumn

Private columnfax As System.Data.DataColumn

Private columnemail As System.Data.DataColumn

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Sub New()
MyBase.New
Me.TableName = "tblRSMs"
Me.BeginInit
Me.InitClass
Me.EndInit
End Sub

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Friend Sub New(ByVal table As System.Data.DataTable)
MyBase.New
Me.TableName = table.TableName
If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
Me.CaseSensitive = table.CaseSensitive
End If
If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
Me.Locale = table.Locale
End If
If (table.Namespace <> table.DataSet.Namespace) Then
Me.Namespace = table.Namespace
End If
Me.Prefix = table.Prefix
Me.MinimumCapacity = table.MinimumCapacity
End Sub

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Protected Sub New(ByVal info As System.Runtime.Serialization.SerializationInfo, ByVal context As System.Runtime.Serialization.StreamingContext)
MyBase.New(info, context)
Me.InitVars
End Sub

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public ReadOnly Property RSMIdColumn() As System.Data.DataColumn
Get
Return Me.columnRSMId
End Get
End Property

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public ReadOnly Property lNameColumn() As System.Data.DataColumn
Get
Return Me.columnlName
End Get
End Property

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public ReadOnly Property fNameColumn() As System.Data.DataColumn
Get
Return Me.columnfName
End Get
End Property

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public ReadOnly Property phoneColumn() As System.Data.DataColumn
Get
Return Me.columnphone
End Get
End Property

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public ReadOnly Property faxColumn() As System.Data.DataColumn
Get
Return Me.columnfax
End Get
End Property

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public ReadOnly Property emailColumn() As System.Data.DataColumn
Get
Return Me.columnemail
End Get
End Property

<System.Diagnostics.DebuggerNonUserCodeAttribute(), _
System.ComponentModel.Browsable(false)> _
Public ReadOnly Property Count() As Integer
Get
Return Me.Rows.Count
End Get
End Property

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Default ReadOnly Property Item(ByVal index As Integer) As tblRSMsRow
Get
Return CType(Me.Rows(index),tblRSMsRow)
End Get
End Property

Public Event tblRSMsRowChanging As tblRSMsRowChangeEventHandler

Public Event tblRSMsRowChanged As tblRSMsRowChangeEventHandler

Public Event tblRSMsRowDeleting As tblRSMsRowChangeEventHandler

Public Event tblRSMsRowDeleted As tblRSMsRowChangeEventHandler

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Overloads Sub AddtblRSMsRow(ByVal row As tblRSMsRow)
Me.Rows.Add(row)
End Sub

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Overloads Function AddtblRSMsRow(ByVal lName As String, ByVal fName As String, ByVal phone As String, ByVal fax As String, ByVal email As String) As tblRSMsRow
Dim rowtblRSMsRow As tblRSMsRow = CType(Me.NewRow,tblRSMsRow)
rowtblRSMsRow.ItemArray = New Object() {Nothing, lName, fName, phone, fax, email}
Me.Rows.Add(rowtblRSMsRow)
Return rowtblRSMsRow
End Function

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Function FindByRSMId(ByVal RSMId As Integer) As tblRSMsRow
Return CType(Me.Rows.Find(New Object() {RSMId}),tblRSMsRow)
End Function

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Overridable Function GetEnumerator() As System.Collections.IEnumerator Implements System.Collections.IEnumerable.GetEnumerator
Return Me.Rows.GetEnumerator
End Function

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Overrides Function Clone() As System.Data.DataTable
Dim cln As tblRSMsDataTable = CType(MyBase.Clone,tblRSMsDataTable)
cln.InitVars
Return cln
End Function

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Protected Overrides Function CreateInstance() As System.Data.DataTable
Return New tblRSMsDataTable
End Function

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Friend Sub InitVars()
Me.columnRSMId = MyBase.Columns("RSMId")
Me.columnlName = MyBase.Columns("lName")
Me.columnfName = MyBase.Columns("fName")
Me.columnphone = MyBase.Columns("phone")
Me.columnfax = MyBase.Columns("fax")
Me.columnemail = MyBase.Columns("email")
End Sub

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Private Sub InitClass()
Me.columnRSMId = New System.Data.DataColumn("RSMId", GetType(Integer), Nothing, System.Data.MappingType.Element)
MyBase.Columns.Add(Me.columnRSMId)
Me.columnlName = New System.Data.DataColumn("lName", GetType(String), Nothing, System.Data.MappingType.Element)
MyBase.Columns.Add(Me.columnlName)
Me.columnfName = New System.Data.DataColumn("fName", GetType(String), Nothing, System.Data.MappingType.Element)
MyBase.Columns.Add(Me.columnfName)
Me.columnphone = New System.Data.DataColumn("phone", GetType(String), Nothing, System.Data.MappingType.Element)
MyBase.Columns.Add(Me.columnphone)
Me.columnfax = New System.Data.DataColumn("fax", GetType(String), Nothing, System.Data.MappingType.Element)
MyBase.Columns.Add(Me.columnfax)
Me.columnemail = New System.Data.DataColumn("email", GetType(String), Nothing, System.Data.MappingType.Element)
MyBase.Columns.Add(Me.columnemail)
Me.Constraints.Add(New System.Data.UniqueConstraint("Constraint1", New System.Data.DataColumn() {Me.columnRSMId}, true))
Me.columnRSMId.AutoIncrement = true
Me.columnRSMId.AllowDBNull = false
Me.columnRSMId.ReadOnly = true
Me.columnRSMId.Unique = true
Me.columnlName.MaxLength = 50
Me.columnfName.MaxLength = 50
Me.columnphone.MaxLength = 10
Me.columnfax.MaxLength = 10
Me.columnemail.MaxLength = 50
End Sub

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Function NewtblRSMsRow() As tblRSMsRow
Return CType(Me.NewRow,tblRSMsRow)
End Function

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Protected Overrides Function NewRowFromBuilder(ByVal builder As System.Data.DataRowBuilder) As System.Data.DataRow
Return New tblRSMsRow(builder)
End Function

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Protected Overrides Function GetRowType() As System.Type
Return GetType(tblRSMsRow)
End Function

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Protected Overrides Sub OnRowChanged(ByVal e As System.Data.DataRowChangeEventArgs)
MyBase.OnRowChanged(e)
If (Not (Me.tblRSMsRowChangedEvent) Is Nothing) Then
RaiseEvent tblRSMsRowChanged(Me, New tblRSMsRowChangeEvent(CType(e.Row,tblRSMsRow), e.Action))
End If
End Sub

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Protected Overrides Sub OnRowChanging(ByVal e As System.Data.DataRowChangeEventArgs)
MyBase.OnRowChanging(e)
If (Not (Me.tblRSMsRowChangingEvent) Is Nothing) Then
RaiseEvent tblRSMsRowChanging(Me, New tblRSMsRowChangeEvent(CType(e.Row,tblRSMsRow), e.Action))
End If
End Sub

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Protected Overrides Sub OnRowDeleted(ByVal e As System.Data.DataRowChangeEventArgs)
MyBase.OnRowDeleted(e)
If (Not (Me.tblRSMsRowDeletedEvent) Is Nothing) Then
RaiseEvent tblRSMsRowDeleted(Me, New tblRSMsRowChangeEvent(CType(e.Row,tblRSMsRow), e.Action))
End If
End Sub

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Protected Overrides Sub OnRowDeleting(ByVal e As System.Data.DataRowChangeEventArgs)
MyBase.OnRowDeleting(e)
If (Not (Me.tblRSMsRowDeletingEvent) Is Nothing) Then
RaiseEvent tblRSMsRowDeleting(Me, New tblRSMsRowChangeEvent(CType(e.Row,tblRSMsRow), e.Action))
End If
End Sub

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Sub RemovetblRSMsRow(ByVal row As tblRSMsRow)
Me.Rows.Remove(row)
End Sub

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Shared Function GetTypedTableSchema(ByVal xs As System.Xml.Schema.XmlSchemaSet) As System.Xml.Schema.XmlSchemaComplexType
Dim type As System.Xml.Schema.XmlSchemaComplexType = New System.Xml.Schema.XmlSchemaComplexType
Dim sequence As System.Xml.Schema.XmlSchemaSequence = New System.Xml.Schema.XmlSchemaSequence
Dim ds As dsRSMs = New dsRSMs
xs.Add(ds.GetSchemaSerializable)
Dim any1 As System.Xml.Schema.XmlSchemaAny = New System.Xml.Schema.XmlSchemaAny
any1.Namespace = "http://www.w3.org/2001/XMLSchema"
any1.MinOccurs = New Decimal(0)
any1.MaxOccurs = Decimal.MaxValue
any1.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax
sequence.Items.Add(any1)
Dim any2 As System.Xml.Schema.XmlSchemaAny = New System.Xml.Schema.XmlSchemaAny
any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
any2.MinOccurs = New Decimal(1)
any2.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax
sequence.Items.Add(any2)
Dim attribute1 As System.Xml.Schema.XmlSchemaAttribute = New System.Xml.Schema.XmlSchemaAttribute
attribute1.Name = "namespace"
attribute1.FixedValue = ds.Namespace
type.Attributes.Add(attribute1)
Dim attribute2 As System.Xml.Schema.XmlSchemaAttribute = New System.Xml.Schema.XmlSchemaAttribute
attribute2.Name = "tableTypeName"
attribute2.FixedValue = "tblRSMsDataTable"
type.Attributes.Add(attribute2)
type.Particle = sequence
Return type
End Function
End Class

<System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
Partial Public Class tblRSMsRow
Inherits System.Data.DataRow

Private tabletblRSMs As tblRSMsDataTable

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Friend Sub New(ByVal rb As System.Data.DataRowBuilder)
MyBase.New(rb)
Me.tabletblRSMs = CType(Me.Table,tblRSMsDataTable)
End Sub

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Property RSMId() As Integer
Get
Return CType(Me(Me.tabletblRSMs.RSMIdColumn),Integer)
End Get
Set
Me(Me.tabletblRSMs.RSMIdColumn) = value
End Set
End Property

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Property lName() As String
Get
Try
Return CType(Me(Me.tabletblRSMs.lNameColumn),String)
Catch e As System.InvalidCastException
Throw New System.Data.StrongTypingException("The value for column 'lName' in table 'tblRSMs' is DBNull.", e)
End Try
End Get
Set
Me(Me.tabletblRSMs.lNameColumn) = value
End Set
End Property

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Property fName() As String
Get
Try
Return CType(Me(Me.tabletblRSMs.fNameColumn),String)
Catch e As System.InvalidCastException
Throw New System.Data.StrongTypingException("The value for column 'fName' in table 'tblRSMs' is DBNull.", e)
End Try
End Get
Set
Me(Me.tabletblRSMs.fNameColumn) = value
End Set
End Property

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Property phone() As String
Get
Try
Return CType(Me(Me.tabletblRSMs.phoneColumn),String)
Catch e As System.InvalidCastException
Throw New System.Data.StrongTypingException("The value for column 'phone' in table 'tblRSMs' is DBNull.", e)
End Try
End Get
Set
Me(Me.tabletblRSMs.phoneColumn) = value
End Set
End Property

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Property fax() As String
Get
Try
Return CType(Me(Me.tabletblRSMs.faxColumn),String)
Catch e As System.InvalidCastException
Throw New System.Data.StrongTypingException("The value for column 'fax' in table 'tblRSMs' is DBNull.", e)
End Try
End Get
Set
Me(Me.tabletblRSMs.faxColumn) = value
End Set
End Property

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Property email() As String
Get
Try
Return CType(Me(Me.tabletblRSMs.emailColumn),String)
Catch e As System.InvalidCastException
Throw New System.Data.StrongTypingException("The value for column 'email' in table 'tblRSMs' is DBNull.", e)
End Try
End Get
Set
Me(Me.tabletblRSMs.emailColumn) = value
End Set
End Property

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Function IslNameNull() As Boolean
Return Me.IsNull(Me.tabletblRSMs.lNameColumn)
End Function

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Sub SetlNameNull()
Me(Me.tabletblRSMs.lNameColumn) = System.Convert.DBNull
End Sub

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Function IsfNameNull() As Boolean
Return Me.IsNull(Me.tabletblRSMs.fNameColumn)
End Function

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Sub SetfNameNull()
Me(Me.tabletblRSMs.fNameColumn) = System.Convert.DBNull
End Sub

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Function IsphoneNull() As Boolean
Return Me.IsNull(Me.tabletblRSMs.phoneColumn)
End Function

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Sub SetphoneNull()
Me(Me.tabletblRSMs.phoneColumn) = System.Convert.DBNull
End Sub

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Function IsfaxNull() As Boolean
Return Me.IsNull(Me.tabletblRSMs.faxColumn)
End Function

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Sub SetfaxNull()
Me(Me.tabletblRSMs.faxColumn) = System.Convert.DBNull
End Sub

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Function IsemailNull() As Boolean
Return Me.IsNull(Me.tabletblRSMs.emailColumn)
End Function

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Sub SetemailNull()
Me(Me.tabletblRSMs.emailColumn) = System.Convert.DBNull
End Sub
End Class

<System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
Public Class tblRSMsRowChangeEvent
Inherits System.EventArgs

Private eventRow As tblRSMsRow

Private eventAction As System.Data.DataRowAction

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Sub New(ByVal row As tblRSMsRow, ByVal action As System.Data.DataRowAction)
MyBase.New
Me.eventRow = row
Me.eventAction = action
End Sub

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public ReadOnly Property Row() As tblRSMsRow
Get
Return Me.eventRow
End Get
End Property

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public ReadOnly Property Action() As System.Data.DataRowAction
Get
Return Me.eventAction
End Get
End Property
End Class
End Class
Namespace dsRSMsTableAdapters

<System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
System.ComponentModel.DesignerCategoryAttribute("code"), _
System.ComponentModel.ToolboxItem(true), _
System.ComponentModel.DataObjectAttribute(true), _
System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
Partial Public Class tblRSMsTableAdapter
Inherits System.ComponentModel.Component

Private WithEvents _adapter As System.Data.SqlClient.SqlDataAdapter

Private _connection As System.Data.SqlClient.SqlConnection

Private _commandCollection() As System.Data.SqlClient.SqlCommand

Private _clearBeforeFill As Boolean

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Sub New()
MyBase.New
Me.ClearBeforeFill = true
End Sub

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Private ReadOnly Property Adapter() As System.Data.SqlClient.SqlDataAdapter
Get
If (Me._adapter Is Nothing) Then
Me.InitAdapter
End If
Return Me._adapter
End Get
End Property

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Friend Property Connection() As System.Data.SqlClient.SqlConnection
Get
If (Me._connection Is Nothing) Then
Me.InitConnection
End If
Return Me._connection
End Get
Set
Me._connection = value
If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
Me.Adapter.InsertCommand.Connection = value
End If
If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
Me.Adapter.DeleteCommand.Connection = value
End If
If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
Me.Adapter.UpdateCommand.Connection = value
End If
Dim i As Integer = 0
Do While (i < Me.CommandCollection.Length)
If (Not (Me.CommandCollection(i)) Is Nothing) Then
CType(Me.CommandCollection(i),System.Data.SqlClient.SqlCommand).Connection = value
End If
i = (i + 1)
Loop
End Set
End Property

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Protected ReadOnly Property CommandCollection() As System.Data.SqlClient.SqlCommand()
Get
If (Me._commandCollection Is Nothing) Then
Me.InitCommandCollection
End If
Return Me._commandCollection
End Get
End Property

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Property ClearBeforeFill() As Boolean
Get
Return Me._clearBeforeFill
End Get
Set
Me._clearBeforeFill = value
End Set
End Property

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Private Sub InitAdapter()
Me._adapter = New System.Data.SqlClient.SqlDataAdapter
Dim tableMapping As System.Data.Common.DataTableMapping = New System.Data.Common.DataTableMapping
tableMapping.SourceTable = "Table"
tableMapping.DataSetTable = "tblRSMs"
tableMapping.ColumnMappings.Add("RSMId", "RSMId")
tableMapping.ColumnMappings.Add("lName", "lName")
tableMapping.ColumnMappings.Add("fName", "fName")
tableMapping.ColumnMappings.Add("phone", "phone")
tableMapping.ColumnMappings.Add("fax", "fax")
tableMapping.ColumnMappings.Add("email", "email")
Me._adapter.TableMappings.Add(tableMapping)
Me._adapter.DeleteCommand = New System.Data.SqlClient.SqlCommand
Me._adapter.DeleteCommand.Connection = Me.Connection
Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[tblRSMs] WHERE (([RSMId] = @Original_RSMId) AND ((@IsNull_lNam"& _
"e = 1 AND [lName] IS NULL) OR ([lName] = @Original_lName)) AND ((@IsNull_fName ="& _
" 1 AND [fName] IS NULL) OR ([fName] = @Original_fName)) AND ((@IsNull_phone = 1 "& _
"AND [phone] IS NULL) OR ([phone] = @Original_phone)) AND ((@IsNull_fax = 1 AND ["& _
"fax] IS NULL) OR ([fax] = @Original_fax)) AND ((@IsNull_email = 1 AND IS"& _
" NULL) OR ([email] = @Original_email)))"
Me._adapter.DeleteCommand.CommandType = System.Data.CommandType.Text
Me._adapter.DeleteCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_RSMId", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "RSMId", System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
Me._adapter.DeleteCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@IsNull_lName", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "lName", System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
Me._adapter.DeleteCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_lName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "lName", System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
Me._adapter.DeleteCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@IsNull_fName", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "fName", System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
Me._adapter.DeleteCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_fName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "fName", System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
Me._adapter.DeleteCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@IsNull_phone", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "phone", System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
Me._adapter.DeleteCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_phone", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "phone", System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
Me._adapter.DeleteCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@IsNull_fax", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "fax", System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
Me._adapter.DeleteCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_fax", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "fax", System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
Me._adapter.DeleteCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@IsNull_email", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "email", System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
Me._adapter.DeleteCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_email", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "email", System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
Me._adapter.InsertCommand = New System.Data.SqlClient.SqlCommand
Me._adapter.InsertCommand.Connection = Me.Connection
Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[tblRSMs] ([lName], [fName], [phone], [fax], [email]) VALUES (@"& _
"lName, @fName, @phone, @fax, @email);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT RSMId, lName, fName, phone, fax, e"& _
"mail FROM tblRSMs WHERE (RSMId = SCOPE_IDENTITY())"
Me._adapter.InsertCommand.CommandType = System.Data.CommandType.Text
Me._adapter.InsertCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@lName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "lName", System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
Me._adapter.InsertCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@fName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "fName", System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
Me._adapter.InsertCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@phone", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "phone", System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
Me._adapter.InsertCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@fax", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "fax", System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
Me._adapter.InsertCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@email", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "email", System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
Me._adapter.UpdateCommand = New System.Data.SqlClient.SqlCommand
Me._adapter.UpdateCommand.Connection = Me.Connection
Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[tblRSMs] SET [lName] = @lName, [fName] = @fName, [phone] = @phone, "& _
"[fax] = @fax, [email] = @email WHERE (([RSMId] = @Original_RSMId) AND ((@IsNull_"& _
"lName = 1 AND [lName] IS NULL) OR ([lName] = @Original_lName)) AND ((@IsNull_fNa"& _
"me = 1 AND [fName] IS NULL) OR ([fName] = @Original_fName)) AND ((@IsNull_phone "& _
"= 1 AND [phone] IS NULL) OR ([phone] = @Original_phone)) AND ((@IsNull_fax = 1 A"& _
"ND [fax] IS NULL) OR ([fax] = @Original_fax)) AND ((@IsNull_email = 1 AND [email"& _
"] IS NULL) OR ([email] = @Original_email)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT RSMId, lName, fName, phone,"& _
" fax, email FROM tblRSMs WHERE (RSMId = @RSMId)"
Me._adapter.UpdateCommand.CommandType = System.Data.CommandType.Text
Me._adapter.UpdateCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@lName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "lName", System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
Me._adapter.UpdateCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@fName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "fName", System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
Me._adapter.UpdateCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@phone", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "phone", System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
Me._adapter.UpdateCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@fax", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "fax", System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
Me._adapter.UpdateCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@email", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "email", System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
Me._adapter.UpdateCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_RSMId", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "RSMId", System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
Me._adapter.UpdateCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@IsNull_lName", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "lName", System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
Me._adapter.UpdateCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_lName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "lName", System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
Me._adapter.UpdateCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@IsNull_fName", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "fName", System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
Me._adapter.UpdateCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_fName", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "fName", System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
Me._adapter.UpdateCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@IsNull_phone", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "phone", System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
Me._adapter.UpdateCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_phone", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "phone", System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
Me._adapter.UpdateCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@IsNull_fax", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "fax", System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
Me._adapter.UpdateCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_fax", System.Data.SqlDbType.NChar, 0, System.Data.ParameterDirection.Input, 0, 0, "fax", System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
Me._adapter.UpdateCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@IsNull_email", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "email", System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
Me._adapter.UpdateCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_email", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "email", System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
Me._adapter.UpdateCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@RSMId", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "RSMId", System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
End Sub

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Private Sub InitConnection()
Me._connection = New System.Data.SqlClient.SqlConnection
Me._connection.ConnectionString = Global.JM_V1._0_d.My.MySettings.Default.JM_DB_V1_0ConnectionString
End Sub

<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Private Sub InitCommandCollection()
Me._commandCollection = New System.Data.SqlClient.SqlCommand(0) {}
Me._commandCollection(0) = New System.Data.SqlClient.SqlCommand
Me._commandCollection(0).Connection = Me.Connection
Me._commandCollection(0).CommandText = "SELECT RSMId, lName, fName, phone, fax, email FROM dbo.tblRSMs"
Me._commandCollection(0).CommandType = System.Data.CommandType.Text
End Sub

<System.Diagnostics.DebuggerNonUserCodeAttribute(), _
System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)> _
Public Overloads Overridable Function Fill(ByVal dataTable As dsRSMs.tblRSMsDataTable) As Integer
Me.Adapter.SelectCommand = Me.CommandCollection(0)
If (Me.ClearBeforeFill = true) Then
dataTable.Clear
End If
Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
Return returnValue
End Function

<System.Diagnostics.DebuggerNonUserCodeAttribute(), _
System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.[Select], true)> _
Public Overloads Overridable Function GetData() As dsRSMs.tblRSMsDataTable
Me.Adapter.SelectCommand = Me.CommandCollection(0)
Dim dataTable As dsRSMs.tblRSMsDataTable = New dsRSMs.tblRSMsDataTable
Me.Adapter.Fill(dataTable)
Return dataTable
End Function

<System.Diagnostics.DebuggerNonUserCodeAttribute(), _
System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
Public Overloads Overridable Function Update(ByVal dataTable As dsRSMs.tblRSMsDataTable) As Integer
Return Me.Adapter.Update(dataTable)
End Function

<System.Diagnostics.DebuggerNonUserCodeAttribute(), _
System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
Public Overloads Overridable Function Update(ByVal dataSet As dsRSMs) As Integer
Return Me.Adapter.Update(dataSet, "tblRSMs")
End Function

<System.Diagnostics.DebuggerNonUserCodeAttribute(), _
System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
Public Overloads Overridable Function Update(ByVal dataRow As System.Data.DataRow) As Integer
Return Me.Adapter.Update(New System.Data.DataRow() {dataRow})
End Function

<System.Diagnostics.DebuggerNonUserCodeAttribute(), _
System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
Public Overloads Overridable Function Update(ByVal dataRows() As System.Data.DataRow) As Integer
Return Me.Adapter.Update(dataRows)
End Function

<System.Diagnostics.DebuggerNonUserCodeAttribute(), _
System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)> _
Public Overloads Overridable Function Delete(ByVal Original_RSMId As Integer, ByVal Original_lName As String, ByVal Original_fName As String, ByVal Original_phone As String, ByVal Original_fax As String, ByVal Original_email As String) As Integer
Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_RSMId,Integer)
If (Original_lName Is Nothing) Then
Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object)
Me.Adapter.DeleteCommand.Parameters(2).Value = System.DBNull.Value
Else
Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object)
Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_lName,String)
End If
If (Original_fName Is Nothing) Then
Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object)
Me.Adapter.DeleteCommand.Parameters(4).Value = System.DBNull.Value
Else
Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object)
Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_fName,String)
End If
If (Original_phone Is Nothing) Then
Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object)
Me.Adapter.DeleteCommand.Parameters(6).Value = System.DBNull.Value
Else
Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object)
Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_phone,String)
End If
If (Original_fax Is Nothing) Then
Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object)
Me.Adapter.DeleteCommand.Parameters(8).Value = System.DBNull.Value
Else
Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object)
Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_fax,String)
End If
If (Original_email Is Nothing) Then
Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object)
Me.Adapter.DeleteCommand.Parameters(10).Value = System.DBNull.Value
Else
Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object)
Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_email,String)
End If
Dim previousConnectionState As System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State
If ((Me.Adapter.DeleteCommand.Connection.State And System.Data.ConnectionState.Open) _
<> System.Data.ConnectionState.Open) Then
Me.Adapter.DeleteCommand.Connection.Open
End If
Try
Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery
Return returnValue
Finally
If (previousConnectionState = System.Data.ConnectionState.Closed) Then
Me.Adapter.DeleteCommand.Connection.Close
End If
End Try
End Function

<System.Diagnostics.DebuggerNonUserCodeAttribute(), _
System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)> _
Public Overloads Overridable Function Insert(ByVal lName As String, ByVal fName As String, ByVal phone As String, ByVal fax As String, ByVal email As String) As Integer
If (lName Is Nothing) Then
Me.Adapter.InsertCommand.Parameters(0).Value = System.DBNull.Value
Else
Me.Adapter.InsertCommand.Parameters(0).Value = CType(lName,String)
End If
If (fName Is Nothing) Then
Me.Adapter.InsertCommand.Parameters(1).Value = System.DBNull.Value
Else
Me.Adapter.InsertCommand.Parameters(1).Value = CType(fName,String)
End If
If (phone Is Nothing) Then
Me.Adapter.InsertCommand.Parameters(2).Value = System.DBNull.Value
Else
Me.Adapter.InsertCommand.Parameters(2).Value = CType(phone,String)
End If
If (fax Is Nothing) Then
Me.Adapter.InsertCommand.Parameters(3).Value = System.DBNull.Value
Else
Me.Adapter.InsertCommand.Parameters(3).Value = CType(fax,String)
End If
If (email Is Nothing) Then
Me.Adapter.InsertCommand.Parameters(4).Value = System.DBNull.Value
Else
Me.Adapter.InsertCommand.Parameters(4).Value = CType(email,String)
End If
Dim previousConnectionState As System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State
If ((Me.Adapter.InsertCommand.Connection.State And System.Data.ConnectionState.Open) _
<> System.Data.ConnectionState.Open) Then
Me.Adapter.InsertCommand.Connection.Open
End If
Try
Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery
Return returnValue
Finally
If (previousConnectionState = System.Data.ConnectionState.Closed) Then
Me.Adapter.InsertCommand.Connection.Close
End If
End Try
End Function

<System.Diagnostics.DebuggerNonUserCodeAttribute(), _
System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)> _
Public Overloads Overridable Function Update(ByVal lName As String, ByVal fName As String, ByVal phone As String, ByVal fax As String, ByVal email As String, ByVal Original_RSMId As Integer, ByVal Original_lName As String, ByVal Original_fName As String, ByVal Original_phone As String, ByVal Original_fax As String, ByVal Original_email As String, ByVal RSMId As Integer) As Integer
If (lName Is Nothing) Then
Me.Adapter.UpdateCommand.Parameters(0).Value = System.DBNull.Value
Else
Me.Adapter.UpdateCommand.Parameters(0).Value = CType(lName,String)
End If
If (fName Is Nothing) Then
Me.Adapter.UpdateCommand.Parameters(1).Value = System.DBNull.Value
Else
Me.Adapter.UpdateCommand.Parameters(1).Value = CType(fName,String)
End If
If (phone Is Nothing) Then
Me.Adapter.UpdateCommand.Parameters(2).Value = System.DBNull.Value
Else
Me.Adapter.UpdateCommand.Parameters(2).Value = CType(phone,String)
End If
If (fax Is Nothing) Then
Me.Adapter.UpdateCommand.Parameters(3).Value = System.DBNull.Value
Else
Me.Adapter.UpdateCommand.Parameters(3).Value = CType(fax,String)
End If
If (email Is Nothing) Then
Me.Adapter.UpdateCommand.Parameters(4).Value = System.DBNull.Value
Else
Me.Adapter.UpdateCommand.Parameters(4).Value = CType(email,String)
End If
Me.Adapter.UpdateCommand.Parameters(5).Value = CType(Original_RSMId,Integer)
If (Original_lName Is Nothing) Then
Me.Adapter.UpdateCommand.Parameters(6).Value = CType(1,Object)
Me.Adapter.UpdateCommand.Parameters(7).Value = System.DBNull.Value
Else
Me.Adapter.UpdateCommand.Parameters(6).Value = CType(0,Object)
Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Original_lName,String)
End If
If (Original_fName Is Nothing) Then
Me.Adapter.UpdateCommand.Parameters(8).Value = CType(1,Object)
Me.Adapter.UpdateCommand.Parameters(9).Value = System.DBNull.Value
Else
Me.Adapter.UpdateCommand.Parameters(8).Value = CType(0,Object)
Me.Adapter.UpdateCommand.Parameters(9).Value = CType(Original_fName,String)
End If
If (Original_phone Is Nothing) Then
Me.Adapter.UpdateCommand.Parameters(10).Value = CType(1,Object)
Me.Adapter.UpdateCommand.Parameters(11).Value = System.DBNull.Value
Else
Me.Adapter.UpdateCommand.Parameters(10).Value = CType(0,Object)
Me.Adapter.UpdateCommand.Parameters(11).Value = CType(Original_phone,String)
End If
If (Original_fax Is Nothing) Then
Me.Adapter.UpdateCommand.Parameters(12).Value = CType(1,Object)
Me.Adapter.UpdateCommand.Parameters(13).Value = System.DBNull.Value
Else
Me.Adapter.UpdateCommand.Parameters(12).Value = CType(0,Object)
Me.Adapter.UpdateCommand.Parameters(13).Value = CType(Original_fax,String)
End If
If (Original_email Is Nothing) Then
Me.Adapter.UpdateCommand.Parameters(14).Value = CType(1,Object)
Me.Adapter.UpdateCommand.Parameters(15).Value = System.DBNull.Value
Else
Me.Adapter.UpdateCommand.Parameters(14).Value = CType(0,Object)
Me.Adapter.UpdateCommand.Parameters(15).Value = CType(Original_email,String)
End If
Me.Adapter.UpdateCommand.Parameters(16).Value = CType(RSMId,Integer)
Dim previousConnectionState As System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State
If ((Me.Adapter.UpdateCommand.Connection.State And System.Data.ConnectionState.Open) _
<> System.Data.ConnectionState.Open) Then
Me.Adapter.UpdateCommand.Connection.Open
End If
Try
Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery
Return returnValue
Finally
If (previousConnectionState = System.Data.ConnectionState.Closed) Then
Me.Adapter.UpdateCommand.Connection.Close
End If
End Try
End Function
End Class
End Namespace
 

vis781

Well-known member
Joined
Aug 30, 2005
Messages
2,015
Location
Cambridge, UK
Programming Experience
5-10
Are you kidding? Thats an awful lot of code. It's giving me a headache just glancing through it!!! Could you just post back the relavent parts.
 
Top Bottom