Re: esql
Posted in 1998
On Wed, 14 Oct 1998, Sven Graefe wrote:
> I have a little eSQL-program, [...] if I logged in as informix, then
> can I execute the program on the server-machine and on clients
> machines, but if I logged in as the owner of the table [...] only on
> the server-machine. [...]
>
> (If an user use 'dbaccess', he has to put in his user name and his
> password, only the informix-user can directly select a database. If this
> do an other user, he get the error message 'Permisson denied or
> user@rechner is not trusted by the server.
> - I think that this 2 problems have the same cause)
Use an explicit connection:
EXEC SQL CONNECT TO 'dbase@server' AS 'conn_name'
USER 'username' USING 'password';
Think carefully about how you derive the username and password; you
probably won't write them directly in the source code except for testing
purposes, and you probably won't use an environment variable for the
password.
Yours,
Jonathan Leffler (jleffler@informix.com) #include <witticism.h>
Guardian of DBD::Informix v0.60 -- http://www.perl.com/CPAN
Informix IDN for D4GL & Linux -- http://www.informix.com/idn