Re: -461 error on connect.
Posted in 1998
Ray O'Hagan wrote: > Hi, > > I have a stored procedure which system() calls one > of our applications. This application itself tries > to connect to the database, but I'm continually getting > a -461 (File Open Error) when I try to connect. Has > anyone come across this before ? The application works > fine if I just run it from the command line, but fails > every time from within the SP. >Informix 7.23 TC1 on Windows NT Server 4.0. Ray, I have run into similar problems on a Unix box. I don't know beans about NT but there might be an analogous situation. When the stored procedure ran the command, it ran on the server box (not on the client box) as user informix with an incomplete login. By this I mean the .profile did not get run. Hence, some env variables (PATH, CDPATH etc) [that normally get set by .profile when you log in normally] simply did not get set for the shell spawned by the procedure. Solution there was to embed the program in a shell script that sets these environment variables (like a cut-down .profile) and then runs the actual application. And have the stored procedure run that script. In order for this to work, 2 more easily forgetten details: 1. SYSTEM the FULL PATH NAME of the shell script. 2. chmod +x the shell script before you try the above. That was the Unix solution. How you carry this to NT, assuming this was the problem, is your problem. > TIA YWR ;) -- -- Jake (Retrospectively realizes there is no future in hindsight) +------------------------------------------------------------+ | The expedient performance of a task with excessive concern | | regarding its duration-to-completion engenders a virtual | | certainty of diminished benefit therefrom. | | -- Benjamin Franklin (but he said it in 3 words) | +------------------------------------------------------------+