this is my script:
DECLARE @ret int
DECLARE @instr sysname
EXEC @ret = xp_cmdshell @instr
UPDATE dirresults SET result=@ret WHERE id=20
the problem is, result always stays empty (even if i change my instruction to something that doesn't exist)
a)how can I get the result (0 or 1)?
b) how can I get the result of the dir command (e.g. the directory listing)?