raiserror
Combining SQL `raiserror` with `select` in C#
I want to know if there is a way of using both SQL raiserror and retrieving the selected result in C#. ExecuteReader() in C# will throw an exception when raiserror occurs, but I still want to use the[详细]
2023-03-21 18:10 分类:问答Can you detect INSERT-EXEC scenario's?
Is it possible to DETECT whether the current stored procedure is being called by an INSERT-EXEC statement?[详细]
2023-03-18 12:11 分类:问答IF, RAISERROR & RETURN in Stored Procedure
I have a stored procedure, PROC, which receives some parameters. If one of them, @ID, is not null, a given stored procedure, PROC_A, must be executed. Otherwise, PROC_B must be executed. The problem i[详细]
2023-03-16 22:44 分类:问答Is there a scalable alternative to SQL Server Query Notifications for raising events in an application from SQL Server?
SQL Server Query Notifications is a great tool, but it doesn\'t seem built to scale very well. Every application that wants/needs notifications has to keep an op开发者_如何学Cen connection to the data[详细]
2023-03-04 20:18 分类:问答SQL Server Query Taking Too Long Handling?
I have a complex query inside a stored proc. Within the proc itself, I would like to judge how long things are taking and do a RAISERROR if I think a 30-second threshhold has been passed (which will f[详细]
2023-02-19 10:10 分类:问答Stored Procedure Syntax Error at Recompile Time is Trapped by Catch AND Returns Empty Resultset
I am trying to isolate an issue (that resembles the topic in stackoverflow.com/q/483787/537284). The issue involves a stored procedure and occurs \"randomly\" once a week. To try and reproduce the iss[详细]
2023-01-30 08:52 分类:问答T-SQL Raiserror Losses Message If Includes Datetime Converted To Char(10)
Okay, so I am trying to raise an error in T-SQL (SQL-2000).The base Sql code looks like this . . . declare @TmsStringchar(10),[详细]
2023-01-30 08:41 分类:问答T-SQL - Return custom error message and end query
开发者_如何学GoI have a lengthy stored procedure in which I would like to do something like the following:[详细]
2023-01-07 02:28 分类:问答sql raiseerror error.number wrong in VB
I wrote a T-SQL query which includes a test for valid EmployeeNo. If the EmployeeNo is not valid, I do the following:[详细]
2022-12-28 10:18 分类:问答Accessing RAISEERROR message from cfstoredproc
I have a SQL stored procedure which under some situations will return a result of -1 if it fails, but also returns a message via the RAISERROR command e.g.:[详细]
2022-12-14 03:15 分类:问答