Online Tutorials & Training Materials | STechies.com
Register Login

How to Capture the Error and Printed in Results Tab?

|| || 0

How to Capture the Error and Printed in Results Tab?
Stechies

Hello Experts,

I am trying to create a directory dynamically in sql server using xp_create_subdir in my stored procedure.

In trying to create dir in network path in \10.20.33.883d$ewfolders. Since the network path is not enabled using xp_cmdshell and my sp throws below error
Xp_create_subdir() return error 161.the specified path is invalid

I need to capture the error and printed in results tab.

Please do the needful. thanks in advance.