RE: A common perl script for different database platforms



Be careful, Hetal!

You should *not* have any

use DBD::xxx;

in your code.

However you *must* have

use DBI;

near the top of the program.

Do you have that? Please answer.

-Will

-----Original Message-----
From: Hetal Soni [mailto:Hetal.Soni@xxxxxxxxx]
Sent: Monday 27 February 2006 17:37
To: Clive Eisen
Cc: dbi-users@xxxxxxxx
Subject: RE: A common perl script for different database platforms


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:


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.


you do have
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.


- - - - - - - Appended by Scientific-Atlanta, Inc. - - - - - - -
This e-mail and any attachments may contain information which is confidential, proprietary, privileged or otherwise protected by law. The information is solely intended for the named addressee (or a person responsible for delivering it to the addressee). If you are not the intended recipient of this message, you are not authorized to read, print, retain, copy or disseminate this message or any part of it. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete it from your computer.

.



Relevant Pages

  • RE: A common perl script for different database platforms
    ... A common perl script for different database platforms ... If you want to load a DBI driver at runtime, ... If you are not the intended recipient, ...
    (perl.dbi.users)
  • Re: A common perl script for different database platforms
    ... use DBI; ... A common perl script for different database platforms ... This email message is for the sole use of the intended ... If you are not the intended recipient, please contact the sender by reply ...
    (perl.dbi.users)
  • RE: How to perform JOINs with DBI
    ... How to perform JOINs with DBI ... This electronic message transmission is a PRIVATE communication which contains ... intended recipient, please be aware that any disclosure, copying, distribution ... sender of the delivery error by replying to this message, or notify us by ...
    (perl.dbi.users)
  • Re: :Oracle debugging
    ... > Thanks Ron, ... > Just as I was getting traceto work, one of my Oracle guys came along and ... Probably a DBI bug that was fixed in 1.43. ... > intended recipient then please promptly delete this e-mail and any ...
    (perl.dbi.users)
  • RE: How to perform JOINs with DBI
    ... How to perform JOINs with DBI ... Javier Moreno ... intended recipient, please be aware that any disclosure, copying, distribution ... sender of the delivery error by replying to this message, or notify us by ...
    (perl.dbi.users)