469,950 Members | 1,514 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,950 developers. It's quick & easy.

sp_executesql Error Trapping

Hi Guys,

I'm new to this forum, so please be gentle!

I'm running bulk insert dynamically using sp_executesql. I've setup error handling in the dynamic code. It works when all is well, however when I get an error such as this...

Bulk Insert data conversion error (truncation)....

The process just fails and doesn't give me a return value.

How can I trap these errors so that I can make sure I know when something has failed? Or is this just not possible?

Aug 2 '07 #1
1 2439
Me Again,

Actually, How do I stop this error from terminating the batch, and therefore my stored procedure? If I can stop the OLEDB Stream from quitting the batch, I can update a table with 0 (in the batch code) and then test the result of this in the stored proc after the dynamic sql has finished.

Aug 2 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

8 posts views Thread by Pete | last post: by
13 posts views Thread by Thelma Lubkin | last post: by
2 posts views Thread by Captain Nemo | last post: by
9 posts views Thread by 47computers | last post: by
1 post views Thread by Elmo Watson | last post: by
4 posts views Thread by franc sutherland | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.