Here is what I'm running. The statement from @cmd_line variable does not get executed. There are no error messages either.

Any help much appreciated.

declare @hr int
declare @object int
declare @src varchar(255)
declare @desc varchar(255)
declare @cmd_line varchar(1000)

exec @hr = sp_oacreate 'WScript.Shell', @object out

if @hr <> 0
begin
exec sp_oageterrorinfo @object, @src out, @desc out
select source=@src, description=@desc
return
end

print 'created shell object'

set @cmd_line = '"C:\Program Files\Microsoft SQL Server\80\Tools\Binn\isql" -U mylogin -P mypass -S MYSQL2000 -d mydb -Q "select getdate()" -o "k:\temp\err.txt"'

exec @hr = sp_oamethod @object, 'run', null, @cmd_line


if @hr <> 0
begin
exec sp_oageterrorinfo @object, @src out, @desc out
select source=@src, description=@desc, cmd_line=@cmd_line
return
end

print 'submitted query'

exec sp_oadestroy @object

print 'destroy shell object'