|
Hi, This is the piece of code for undocumented proc xp_delete_file. It executes fine with dynamic SQL but does not work with execute command. Can anyone please give the reason for this ?
(comments are locked)
|
|
The problem is the with the datatype of the variable @CurrentDirectory. It cannot be passed as But I doubt that there would be such big path for the directory. I guess Thanks, Usman, It worked
Feb 22 '12 at 05:53 PM
inder
(comments are locked)
|


When you say it doesn't work, does that mean you get an error message or that nothing at all happens?
I get error message for invalid parameter like Msg 22049, Level 15, State 0, Line 0 Error executing extended stored procedure: Invalid Parameter
But same works with execute(@sql).