On Monday, May 6, 2002, at 02:36 , Lance Prais wrote:
[..]
>  Does anyone know why I could be getting this error?

not sure - you might want to also re-read

  http://search.cpan.org/doc/TIMB/DBI-1.21/DBI.pm

> Connection String:
> use DBI;
>
> my $connect_string="DBI:Oracle:$SERVICE";
>
> my $dbh = DBI->connect(my $connect_string,my $oracle_user,my
> $oracle_password,
>         { AutoCommit=> 0,  LongTruncOk=> 'TRUE', PrintError => 1,
> ChopBlanks=> 'TRUE',LongTruncOk=> 'TRUE',LongReadLen=> 50000, RaiseError 
> =>
> 1 }) or die "connecting: $DBI::errstr";
>
>
> Error Message:
> Can't connect(   HASH(0xf696c)), no database driver specified and DBI_DSN
> env var not set at ./daily_sr.pl line 19


I think we may have over my'd this....

you are 'declaring variables' in the method call....
Hence sending in uninitialized data into the connect method...

how about:

        #--------------untested----------------------
        use DBI;
        # where did $SERVICE get defined????

        my      ($service, $user, $auth) =
                ("DBI:Oracle:$SERVICE" , 'theOracleGuy', 'theOneTruePw');

        my %dbi_con_attr  = (
                AutoCommit=> 0, LongTruncOk=> 'TRUE', PrintError => 1,
                ChopBlanks=> 'TRUE',LongTruncOk=> 'TRUE',LongReadLen=> 50000,
                RaiseError => 1,
        ) ;


        my $dbh = DBI->connect($service, $user, $auth, \%dbi_con_attr )
                                or die "connecting: $DBI::errstr :$!\n";

        #--------------untested----------------------

boy if that doesn't have template written all over it....

ciao
drieux

---


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to