Hi,
I use VB.NET and ADO.net for creating a WINFORM application that use
web service.
That web service use ADO.net dataset as the receiving parameter and is responsible to make the update to the SQL2000 server database and return the refresh dataset.
Everything work fine , except when there is any errors like, DBConcurrencyException.
On the client side, a window is popup (type: soaperror) stating there is a concurrency error, this because I use try,catch in the client side and use the exception in the catch.
If I try the DBConcurrencyException in the catch in the client side it is never pickup because it append in the web service.
So how do I catch or report the row of the error ?? Any idea ..
Thanks
Catch code on client :
Catch DB_ex As DBConcurrencyException
Dim customErrorMessage As String
customErrorMessage = DB_ex.Message & vbCrLf
customErrorMessage += CType(DB_ex.Row.Item(0), String) & vbCrLf
If Not IsNothing(DB_ex.InnerException) Then
customErrorMessage += DB_ex.InnerException.Message
End If
MessageBox.Show(customErrorMessage, DB_ex.GetType.ToString)
' Replace the above code with appropriate business logic
' to resolve the concurrency violation.
Catch objException As Exception
'Display the exception message
Dim strerror As String
strerror = objException.Message
If Not IsNothing(objException.InnerException) Then
strerror += objException.InnerException.Message
End If
MessageBox.Show(strerror, objException.GetType.ToString)
End Try
Carl Barbeau.
Analyst Designer office systems.
Carl Barbeau consultant Inc.