S
shapper
Hello,
I am raising an error on my SQL 2005 procedure as follows:
RAISERROR(@ErrorMessage, @ErrorSeverity, 1)
How can I access it in my ASP.NET code? I am using Enterprise Library
Data Block to access the database.
This is the code I have:
Try
Dim dbBlog As Database = DatabaseFactory.CreateDatabase("MyDB")
Dim dbcBlog As DbCommand =
dbBlog.GetStoredProcCommand("by27_Blogger_CreateBlog")
dbBlog.AddInParameter(dbcBlog, "@BlogName", DbType.String, name)
dbBlog.AddInParameter(dbcBlog, "@BlogComment", DbType.String,
comment)
dbBlog.ExecuteNonQuery(dbcBlog)
Catch ex As System.Exception
End Try
Thanks,
Miguel
I am raising an error on my SQL 2005 procedure as follows:
RAISERROR(@ErrorMessage, @ErrorSeverity, 1)
How can I access it in my ASP.NET code? I am using Enterprise Library
Data Block to access the database.
This is the code I have:
Try
Dim dbBlog As Database = DatabaseFactory.CreateDatabase("MyDB")
Dim dbcBlog As DbCommand =
dbBlog.GetStoredProcCommand("by27_Blogger_CreateBlog")
dbBlog.AddInParameter(dbcBlog, "@BlogName", DbType.String, name)
dbBlog.AddInParameter(dbcBlog, "@BlogComment", DbType.String,
comment)
dbBlog.ExecuteNonQuery(dbcBlog)
Catch ex As System.Exception
End Try
Thanks,
Miguel