Re: A common perl script for different database platforms
- From: me@xxxxxxxxxx (Jay Strauss)
- Date: Mon, 27 Feb 2006 16:46:45 -0600
They mean, your script needs to look like:
use DBI;
my $dbh = DBI->connect("DBI:$DBType:$DbName", "$User", "$Pwd", {AutoCommit
=> 0, PrintError => 0, RaiseError => 0 }) or print"\nCouldn't connect to the
database $DBType $DbName $User - " .DBI->errstr;
J
On 2/27/06, Hetal Soni <Hetal.Soni@xxxxxxxxx> wrote:
This how I connect to db:
my $dbh = DBI->connect("DBI:$DBType:$DbName", "$User", "$Pwd", {
AutoCommit => 0, PrintError => 0, RaiseError => 0 }) or print
"\nCouldn't connect to the database $DBType $DbName $User - " .
DBI->errstr;
I don't have any use:DBD::* line in my program.. I removed 'em as
suggested before.
Thanks for the input.
Hetal.
-----Original Message-----
From: Clive Eisen [mailto:clive@xxxxxxxxxxxxxxx]
Sent: Monday, February 27, 2006 5:32 PM
To: Hetal Soni
Cc: dbi-users@xxxxxxxx
Subject: Re: A common perl script for different database platforms
Hetal Soni wrote:
you do have
Thanks for your input guys.
I removed both "use:DBD::Oralce" and "use"DBD:DB2" lines and now
getting following error:
Can't locate object method "connect" via package "DBI" (perhaps you
forgot to lo ad "DBI"?) at tmp1.plx line 58.
use DBI;
in your program?
NOTICE: This email message is for the sole use of the intended
recipient(s) and may contain confidential and privileged information. Any
unauthorized review, use, disclosure or distribution is strictly prohibited.
If you are not the intended recipient, please contact the sender by reply
email and destroy all copies and attachments of the original message.
- References:
- RE: A common perl script for different database platforms
- From: Hetal Soni
- RE: A common perl script for different database platforms
- Prev by Date: RE: A common perl script for different database platforms
- Next by Date: RE: Connect to Oracle
- Previous by thread: RE: A common perl script for different database platforms
- Next by thread: RE: A common perl script for different database platforms
- Index(es):
Relevant Pages
|