G
Guest
Hello everyone
I have a HUGE database, with very complex stored procedures that handle every possible error and the passed it to an ASP site with RAISERROR
Now I need to use that same database on an ASP.NET site, but all I can do is
Tr
Common.ExecuteNonQuery(QueryString, Common.Connection
Catch Ex As SqlExceptio
Result.Text = Ex.Messag
Finall
Common.Connection.Close(
End Tr
I really NEED to have the RAISERROR message... how can I do this
I tried some people's advice, by doing this
Dim myError As OdbcErro
For Each myError In Ex.Error
Result.Text = Result.Text & myError.Message() & "<br/>
Nex
But there I only get the elements
[Microsoft][ODBC SQL Server Driver][SQL Server]Violation of PRIMARY KEY constraint 'PK_User'. Cannot insert duplicate key in object 'User'
[Microsoft][ODBC SQL Server Driver][SQL Server]The statement has been terminated
I DON'T get my RAISERROR message... Even though if I execute this Stored Procedure on the Query Analyzer, and I get this
Server: Msg 2627, Level 14, State 1, Procedure InsertCompany, Line 7
Violation of PRIMARY KEY constraint 'PK_User'. Cannot insert duplicate key in object 'User'
The statement has been terminated
Server: Msg 50000, Level 16, State 1, Procedure InsertCompany, Line 8
The username 'emarinelli' has already been taken.
I have a HUGE database, with very complex stored procedures that handle every possible error and the passed it to an ASP site with RAISERROR
Now I need to use that same database on an ASP.NET site, but all I can do is
Tr
Common.ExecuteNonQuery(QueryString, Common.Connection
Catch Ex As SqlExceptio
Result.Text = Ex.Messag
Finall
Common.Connection.Close(
End Tr
I really NEED to have the RAISERROR message... how can I do this
I tried some people's advice, by doing this
Dim myError As OdbcErro
For Each myError In Ex.Error
Result.Text = Result.Text & myError.Message() & "<br/>
Nex
But there I only get the elements
[Microsoft][ODBC SQL Server Driver][SQL Server]Violation of PRIMARY KEY constraint 'PK_User'. Cannot insert duplicate key in object 'User'
[Microsoft][ODBC SQL Server Driver][SQL Server]The statement has been terminated
I DON'T get my RAISERROR message... Even though if I execute this Stored Procedure on the Query Analyzer, and I get this
Server: Msg 2627, Level 14, State 1, Procedure InsertCompany, Line 7
Violation of PRIMARY KEY constraint 'PK_User'. Cannot insert duplicate key in object 'User'
The statement has been terminated
Server: Msg 50000, Level 16, State 1, Procedure InsertCompany, Line 8
The username 'emarinelli' has already been taken.