Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Anthony Chan asked how to supply a password to CONNECT TO in a 4GL program and whether .netrc works. Jonathan Leffler said DB-Access assumes interactive use; SQLCMD needs the password in the script, and I4GL 7.30 supports it. Rudy Fernandes described a .netrc entry with no group or other permissions. Julian Mummery suggested the DATABASE statement.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Anthony Chan — — source: Informix-list mailing list archive (1991-1998)
I have a question on how to change the connection of database server in a
4gl program. I tried to use CONNECT TO statement in dbaccess but I was
prompted to input password. How can I pass a password in the CONNECT TO
statement? Which version of Informix SQL and Informix 4GL have this
feature?
Also, I have read a note talking about .netrc. is it work in my case? if
so, how can I set it up?
Thanks for your help!
Anthony Chan
↪ replying to Anthony Chan
Jonathan Leffler — — source: Informix-list mailing list archive (1991-1998)
Anthony Chan wrote:
> I have a question on how to change the connection of database server in a
> 4gl program. I tried to use CONNECT TO statement in dbaccess but I was
> prompted to input password.
That's DB-Access's idea of a joke. It assumes that you are
running it interactively. If that isn't valid for you, use
SQLCMD from the IIUG software archives -- but be aware that
it requires the password written out in the SQL script, which
has its own, different (security) problems.
> How can I pass a password in the CONNECT TO
> statement? Which version of Informix SQL and Informix 4GL have this
> feature?
I4GL 7.30 does; ISQL 7.30 might, but probably doesn't.
> Also, I have read a note talking about .netrc. is it work in my case? if
> so, how can I set it up?
Doubtful.
--
Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net)
Guardian of DBD::Informix v0.95 -- see http://www.perl.com/CPAN
#include <disclaimer.h>
↪ replying to Anthony Chan
Rudy Fernandes — — source: Informix-list mailing list archive (1991-1998)
Anthony Chan wrote:
> I have a question on how to change the connection of database server in a
> 4gl program. I tried to use CONNECT TO statement in dbaccess but I was
> prompted to input password.
If your .netrc is setup correctly, you can hit <ENTER> at this point without
inputting a username and password. You would then connect as the current
"user".
> How can I pass a password in the CONNECT TO
> statement? Which version of Informix SQL and Informix 4GL have this
> feature?
If its 4GL, why don't you use the DATABASE statement.
> Also, I have read a note talking about .netrc. is it work in my case? if
> so, how can I set it up?
Here's a typical .netrc entry. The read, write & execute permissions for
group and other must be 0.
machine starfire11 login informix password itsgreat
machine, login and password are keywords that may not be changed.
>
>
> Thanks for your help!
>
> Anthony Chan
You can use the connect keyword e.g.
database sysmaster
display "you are now connected to sysmaster"
database yourdatabase
display "you are now connected to yourdatabase"
Julian Mummery
http://go.to/codecutters/
In article <89eak2$epc$1@unix2.glink.net.hk>,
"Anthony Chan" <manlungc@hongkong.com> wrote:
> I have a question on how to change the connection of database server
in a
> 4gl program. I tried to use CONNECT TO statement in dbaccess but I
was
> prompted to input password. How can I pass a password in the CONNECT
TO
> statement? Which version of Informix SQL and Informix 4GL have this
> feature?
>
> Also, I have read a note talking about .netrc. is it work in my case?
if
> so, how can I set it up?
>
> Thanks for your help!
>
> Anthony Chan
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.