如何使用存储过程写入日志文件并记录错误 [英] How to write log file using Stored Procedure and log the errors
本文介绍了如何使用存储过程写入日志文件并记录错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好
我只是用谷歌搜索,但没有找到正确的解决方案.
我想使用有错误的存储过程来编写文本文件.
我在sp中有大约64个delete语句.执行每个语句后
如果有错误,我必须使用SP在.txt文件中写入该错误.
否则,我必须从delete语句中写入受影响的记录数.
怎么做?如何使用SP创建.txt文件?
在此先谢谢您.
Hi all
I just googled but could not get the right solution.
I want to write the text file using stored procedure with errors.
I have about 64 delete statements in sp. After executing each statement
if there is error i have to write that error in .txt file using SP.
Otherwise i have to write the affected record count from delete statement.
How to do that? How to create the .txt file using SP?
Thanks in advance.
推荐答案
此链接 [ ^ ]将为您提供帮助.
This link [^] will help you.
这篇关于如何使用存储过程写入日志文件并记录错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文