Taken this is SQL Server,
KILL
command does not use parenthesis, Have a try with
Exec('kill 51')
Another this is that depending on the library you use, it may or may not require
EXEC
for the call. So if the problem still remains, try executing the command simply as
kill 51