Ray's Asp.net Blog
Answers and code snippets from ASP.NET projects (Webforms/MVC/Classic ASP)
Pages
Event registration app with QR/Paypal
Home
Wednesday, October 15, 2014
How to write error information into MS SQL Server log?
DECLARE
@isExists
INT
exec
master
.
dbo
.
xp_fileexist
'C:\FileName.csv'
,
@isExists
OUTPUT
IF
@isExists
<>
1
begin
RAISERROR
(
'Can not find csv file'
,
-- Message text.
16
,
-- Severity.
1
-- State.
)
WITH
LOG
;
end
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment