Help plz: DBD:Informix
Posted in 2000
Topics: Platform-Specific Issues
Hi all! I try top connect from NT to Informix OWS 7.21 on Solaris box using perl DBD::Informix 1.00.PC1 module. This one works fine with one exception: it don't change user name, ie, try to connect as default user set in setnet32 program. This is example: --example.pl-- #! /usr/bin/perl use DBI $op=$ARGV[0]; $pass=$ARGV[1]; $dbh=DBI->connect('dbi:Informix:database@server', $op, $pass); -- So, when i start this script as perl example.pl wrong wrong it connects to database as default user. But if I change coonect string to $dbh=DBI->connect('dbi:Informix:database@server', "wrong", "wrong"); Informix reports an error. Please, help me ASAP Thanks in advance -- Best regards, Sviatoslav.
On 18 May 2000 12:53:56 +0400, rsvato Wrote:
>
> Hi all!
>
> I try top connect from NT to Informix OWS 7.21 on Solaris box using
> perl DBD::Informix 1.00.PC1 module. This one works fine with one exception:
> it don't change user name, ie, try to connect as default user set in
> setnet32 program. This is example:
> --example.pl--
> #! /usr/bin/perl
>
> use DBI
>
> $op=$ARGV[0];
> $pass=$ARGV[1];
>
> $dbh=DBI->connect('dbi:Informix:database@server', $op, $pass);
> --
>
> So, when i start this script as
>
> perl example.pl wrong wrong
>
> it connects to database as default user. But if I change coonect string to
>
> $dbh=DBI->connect('dbi:Informix:database@server', "wrong", "wrong");
>
> Informix reports an error.
>
I dont see this behaviour. What do you get when you run :
select user from systables
for instance ?
/J\\
>>>>> "Jonathan" ( Jonathan Stowe ) writes: >> Hi all! >> >> I try top connect from NT to Informix OWS 7.21 on Solaris box using >> perl DBD::Informix 1.00.PC1 module. This one works fine with one >> exception: it don't change user name, ie, try to connect as default >> user set in setnet32 program. This is example: --example.pl-- #! >> /usr/bin/perl >> >> use DBI >> >> $op=$ARGV[0]; $pass=$ARGV[1]; >> >> $dbh=DBI->connect('dbi:Informix:database@server', $op, $pass); -- >> >> So, when i start this script as >> >> perl example.pl wrong wrong >> >> it connects to database as default user. But if I change coonect string >> to >> >> $dbh=DBI->connect('dbi:Informix:database@server', "wrong", "wrong"); >> >> Informix reports an error. >> Jonathan> I dont see this behaviour. What do you get when you run : Jonathan> select user from systables Jonathan> for instance ? Jonathan> /J\\ I get names of this default users. I forgot, this strange behaviour i found when try a little stored procedure, that used this variable. I see that these strange things occurs when i pass an empty variable instead of username or password, but now i have all variables defined (i even changed DBI.pm to dump username and password to stderr to verify it). BTW, with OBDC all work fine, but DBD::Informix is faster that DBD::ODBC and Informix ODBC driver. -- Best regards, Sviatoslav.