hello
I am trying to do an erroraise from sql server in a stored procedureto vb and then
show it to the user, but I cant get it together.
anybody with an idea.
thanks Micke
Printable View
hello
I am trying to do an erroraise from sql server in a stored procedureto vb and then
show it to the user, but I cant get it together.
anybody with an idea.
thanks Micke
Hi
Stored Procedure:
VB:Code:CREATE PROCEDURE spu_test
AS
RaisError ('THERE WAS AN ERROR', 15, 1)
This will raise an error from the SQL Stored Proc and pass it back to the client for handlingCode:
Private Sub Form_Load()
On Error GoTo Err_Handler
Dim cn As New Connection
cn.Open <ConnectionString>
cn.Execute "spu_test"
Exit Sub
Err_Handler:
MsgBox Err.Description
End Sub