Gary Chen wrote:
>
> Has anyone encountered any problems using the system command within a
> stored procedure running under Informix DS for NT?
>
> When I execute a procedure such as follows, I get two errors: a -668
> error, and then a -1 error. The 668 indicates there was an OS error,
> and the 1 error specifies "Not owner". It seems to be a permission
> error, but I am logged in as Informix at the console, and Informix is a
> domain administrator.
>
> create procedure testing() returning integer;> system "<anything>";
> end procedure;
>
> I have tried <anything> with various DOS commands, but to no avail.
I believe you should use "cmd.exe /C" in your <anything>, so
system "cmd.exe /C <bla_bla_bla>";
e.g.
system 'cmd.exe /C echo 'Hello, NT :-)' >> C:\\output.txt';
>
> Thanks in advance.
>
> -Gary
>
> PS. If you reply to the NG, could you please cc to my work address,
> gchen@nexgensi.com.
HTH
Vardan
--
vaar@geocities.com