L
lloyd M
Hi,
I have this function below that accepts a dataset called common, i
have added a new row to the dataset and now i am trying to save the
record to the database
My problem is that once the DS.UPDATE is called it saves the record to
the database, but then it skips directly to the end of function
instead of going to the "If common.HasErrors Then" step.
Below is the function, some one please help me, i dnt knw what is
going on
Public Function Insert_Login(ByVal common As CO_Login) As Boolean
Try
DS = New SqlDataAdapter
DS.TableMappings.Add("Users", "common")
DS.InsertCommand = GetInsertCommand()
DS.Update(common, "users")
'
' Check for table errors to see if the update failed.
'
If common.HasErrors Then
common.Tables("users").GetErrors(0).ClearErrors()
Else
common.AcceptChanges()
End If
Catch ex As Exception
End Try
End Function
I have this function below that accepts a dataset called common, i
have added a new row to the dataset and now i am trying to save the
record to the database
My problem is that once the DS.UPDATE is called it saves the record to
the database, but then it skips directly to the end of function
instead of going to the "If common.HasErrors Then" step.
Below is the function, some one please help me, i dnt knw what is
going on
Public Function Insert_Login(ByVal common As CO_Login) As Boolean
Try
DS = New SqlDataAdapter
DS.TableMappings.Add("Users", "common")
DS.InsertCommand = GetInsertCommand()
DS.Update(common, "users")
'
' Check for table errors to see if the update failed.
'
If common.HasErrors Then
common.Tables("users").GetErrors(0).ClearErrors()
Else
common.AcceptChanges()
End If
Catch ex As Exception
End Try
End Function