A common perl script for different database platforms

A common perl script for different database platforms

am 25.02.2006 21:53:51 von Hetal.Soni

------_=_NextPart_001_01C63A4D.95C92BE7
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

DBI Gurus,
=20
I've been trying to write a common perl script that connects to either
Oracle or DB2 database. All code lines within the script are same for
both database platform. Depending on database platform identifier
supplied during runtime ("O" for Oracle and "D" for DB2) it would
connect to appropriate database platform.=20
=20
When I compile or (execute) this script to connect to Oracle database
from the machine on which DB2 client is not installed, it errors out
with following message:
=20
"This application has failed to start because DB2CLI.dll was not
found.Re-installing the application may fix this problem".
=20
Below is code lines to use library for Oracle or DB2:
=20
if ($opt_p eq "O") {

$DBType =3D "Oracle";

use DBD::Oracle;

};

if ($opt_p eq "D") {

$DBType =3D "DB2";

use DBD::DB2;

};

If I comment "use DBD::DB2;" line out and then compile it it works fine.


At this point the only workaround I found is, create two separate
scripts for each database platform and compile/execute the script on
machine where appropriate DBD module installed.

Is there any work around to get passed this problem without installing
DB2 libraries on the machine. Obliviously, client do not want install
DB2 libraries on which Oracle database is running and vice-a-versa.

How can I make a perl script from database library independent. We're
planning to use this script against SQL server and UDB database platform
and seem that we need to maintain four different code lines for each
database platform.

Any input would be greatly appreciated.


Thanks,

Hetal.

=20

=20

=20

=20

=20



NOTICE: This email message is for the sole use of the intended recipient(=
s) and may contain confidential and privileged information. Any unauthori=
zed review, use, disclosure or distribution is strictly prohibited. If yo=
u are not the intended recipient, please contact the sender by reply emai=
l and destroy all copies and attachments of the original message.

------_=_NextPart_001_01C63A4D.95C92BE7--

Re: A common perl script for different database platforms

am 26.02.2006 00:46:59 von Tyler

Hetal Soni wrote:
> Below is code lines to use library for Oracle or DB2:
>
> if ($opt_p eq "O") {
> $DBType = "Oracle";
> use DBD::Oracle;
> };
>
> if ($opt_p eq "D") {
> $DBType = "DB2";
> use DBD::DB2;
> };
>
> If I comment "use DBD::DB2;" line out and then compile it it works fine.

You don't have to "use" a DBD:: driver to connect to it; when you
call DBI's "connect" method, it will do that for you. Try removing both
"use" lines above and see if that solves it.

Cheers,
Tyler

Re: A common perl script for different database platforms

am 26.02.2006 07:15:55 von Alexander

Right. And to explain why this does not work:

Perl handles "use" at compile time, not at runtime. "use WhatEver" is
roughly equivalent to "BEGIN { require WhatEver; WhatEver->import() if
WhatEver->can('import'); }", so you always use both DBD::Oracle and
DBD::DB2, no matter what $opt_p contains.

If you want to load a module at runtime, use require.
If you want to load a DBI driver (DBD::*) at runtime, let DBI handle it.

Alexander

Tyler MacDonald wrote:

>Hetal Soni wrote:
>
>
>>Below is code lines to use library for Oracle or DB2:
>>
>>if ($opt_p eq "O") {
>>$DBType = "Oracle";
>>use DBD::Oracle;
>>};
>>
>>if ($opt_p eq "D") {
>>$DBType = "DB2";
>> use DBD::DB2;
>>};
>>
>>If I comment "use DBD::DB2;" line out and then compile it it works fine.
>>
>>
>
> You don't have to "use" a DBD:: driver to connect to it; when you
>call DBI's "connect" method, it will do that for you. Try removing both
>"use" lines above and see if that solves it.
>
> Cheers,
> Tyler
>
>


--
Alexander Foken
mailto:alexander@foken.de http://www.foken.de/alexander/

Zip Codes, Long/Lat and LAMP?

am 26.02.2006 17:22:51 von treii28

OK, I think I asked something along these lines before, but I am actually
starting to code so I wanted to revise the question(s) a bit. I am looking for
a good way to keep an up-to-date database (or perhaps use an XML-RPC/SOAP based
service) to translate back-and-forth between information such as
city/state/county, zip-code, and longitude/latitude.

I am currently writing most of my administrative tools in PHP but will likely
build most of my content delivery items in PERL. I am going to be dealing with
geocaching on the initial project and thus the locations might be specified by
the name of a nearby city, a zipcode, possibly even crossroads (I'll have to
work that one out later) or more often by use of GPS or similar Longitude and
Latitude coordinates.

My desire is to be as thorough as possible with what is actually stored and
'fill in the blanks' for the user only requiring them to fill in an 'either/or'
type scenario. (use of an address OR long/lat coordinates)

Thus I am looking for some way to translate one to the other and back again.
(address/zip/city to long/lat, or long/lat to zip/city/county/state/etc.)
Ultimately I want to include at least canada and possibly international
locations (although I will likely use different tools for handling those).

I've started looking at some of the services available at USPS and
zip-codes.com. I'll start looking at map-services next as I would also like to
be able to generate maps for people as well as possibly have them select
locations on a map rather than enter the specific data. (ugh - I have a feeling
that might be a nightmare)

Finally, I'm sure if I can get something to work for the above mentioned
translations (so I can store at least an approximate long/lat for all
locations) then I can find the math myself to calculate distances, but I would
be curious to know if any packages for such already exist. I did a quick
search of perl but only found one CPAN tool that appeared to do Long/Lat
calculations and it's not one included in the standard CPAN supported
downloads.

All help is appreciated.

SW

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Re: Zip Codes, Long/Lat and LAMP?

am 26.02.2006 17:47:13 von btilly

On 2/26/06, Scott Webster Wood wrote:
> OK, I think I asked something along these lines before, but I am actually
> starting to code so I wanted to revise the question(s) a bit. I am looki=
ng for
> a good way to keep an up-to-date database (or perhaps use an XML-RPC/SOAP=
based
> service) to translate back-and-forth between information such as
> city/state/county, zip-code, and longitude/latitude.
[...]

I am going to strongly recommend that you NOT do this yourself.=20
Instead enter into a business relationship with someone who already
does this, like mapquest, google, etc. They should not only maintain
the up to date data, but they have web APIs, and should have examples
of calling them in a variety of languages.

Cheers,
Ben

RE: Zip Codes, Long/Lat and LAMP?

am 27.02.2006 16:35:05 von Will.Rutherdale

Formulas for great circle distances aren't hard to derive using just
basic trig. No calculus required!

That being said, the Math::Trig package comes standard with Perl
distributions and has a function called great_circle_distance(). Try
'man Math::Trig'. If you search PDL::Index on CPAN, I believe you'll
find even more sophisticated resources for longitude/latitude and
distance calculations.

As for tracking data, *of course* you want to use Perl with DBI. :-)
Pick the database you like, for instance PostgreSQL.

Maybe these questions should be posted on more general Perl lists until
you can identify specific DBI problems.

There are general textbooks out there on web programming, for instance
_Programming the World Wide Web_ by Sebesta.

-Will


-----Original Message-----
From: Scott Webster Wood [mailto:treii28@yahoo.com]=20
Sent: Sunday 26 February 2006 11:23
To: dbi-users@perl.org
Subject: Zip Codes, Long/Lat and LAMP?


OK, I think I asked something along these lines before, but I am
actually
starting to code so I wanted to revise the question(s) a bit. I am
looking for
a good way to keep an up-to-date database (or perhaps use an
XML-RPC/SOAP based
service) to translate back-and-forth between information such as
city/state/county, zip-code, and longitude/latitude.

I am currently writing most of my administrative tools in PHP but will
likely
build most of my content delivery items in PERL. I am going to be
dealing with
geocaching on the initial project and thus the locations might be
specified by
the name of a nearby city, a zipcode, possibly even crossroads (I'll
have to
work that one out later) or more often by use of GPS or similar
Longitude and
Latitude coordinates.

My desire is to be as thorough as possible with what is actually stored
and
'fill in the blanks' for the user only requiring them to fill in an
'either/or'
type scenario. (use of an address OR long/lat coordinates)

Thus I am looking for some way to translate one to the other and back
again.
(address/zip/city to long/lat, or long/lat to
zip/city/county/state/etc.)=20
Ultimately I want to include at least canada and possibly international
locations (although I will likely use different tools for handling
those).

I've started looking at some of the services available at USPS and
zip-codes.com. I'll start looking at map-services next as I would also
like to
be able to generate maps for people as well as possibly have them select
locations on a map rather than enter the specific data. (ugh - I have a
feeling
that might be a nightmare)

Finally, I'm sure if I can get something to work for the above mentioned
translations (so I can store at least an approximate long/lat for all
locations) then I can find the math myself to calculate distances, but I
would
be curious to know if any packages for such already exist. I did a
quick
search of perl but only found one CPAN tool that appeared to do Long/Lat
calculations and it's not one included in the standard CPAN supported
downloads.

All help is appreciated.

SW

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around=20
http://mail.yahoo.com=20


- - - - - - - Appended by Scientific-Atlanta, Inc. - - - - - - - =20
This e-mail and any attachments may contain information which is confidenti=
al, proprietary, privileged or otherwise protected by law. The information =
is solely intended for the named addressee (or a person responsible for del=
ivering it to the addressee). If you are not the intended recipient of this=
message, you are not authorized to read, print, retain, copy or disseminat=
e 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.

Re: Zip Codes, Long/Lat and LAMP?

am 27.02.2006 16:48:16 von Alec

Have you looked at PostGIS? It's an open component which is built on
top of PostgreSQL for performing geographic queries such as distances
between two points. You can perform the queries through DBD:Pg.
http://www.postgis.org/

I believe there is also a subgroup working on a geocoder which will use
TIGER data to assign Lat/Lon based on an address.
-Alec


Rutherdale, Will wrote:
> Formulas for great circle distances aren't hard to derive using just
> basic trig. No calculus required!
>
> That being said, the Math::Trig package comes standard with Perl
> distributions and has a function called great_circle_distance(). Try
> 'man Math::Trig'. If you search PDL::Index on CPAN, I believe you'll
> find even more sophisticated resources for longitude/latitude and
> distance calculations.
>
> As for tracking data, *of course* you want to use Perl with DBI. :-)
> Pick the database you like, for instance PostgreSQL.
>
> Maybe these questions should be posted on more general Perl lists until
> you can identify specific DBI problems.
>
> There are general textbooks out there on web programming, for instance
> _Programming the World Wide Web_ by Sebesta.
>
> -Will
>
>
> -----Original Message-----
> From: Scott Webster Wood [mailto:treii28@yahoo.com]
> Sent: Sunday 26 February 2006 11:23
> To: dbi-users@perl.org
> Subject: Zip Codes, Long/Lat and LAMP?
>
>
> OK, I think I asked something along these lines before, but I am
> actually
> starting to code so I wanted to revise the question(s) a bit. I am
> looking for
> a good way to keep an up-to-date database (or perhaps use an
> XML-RPC/SOAP based
> service) to translate back-and-forth between information such as
> city/state/county, zip-code, and longitude/latitude.
>
> I am currently writing most of my administrative tools in PHP but will
> likely
> build most of my content delivery items in PERL. I am going to be
> dealing with
> geocaching on the initial project and thus the locations might be
> specified by
> the name of a nearby city, a zipcode, possibly even crossroads (I'll
> have to
> work that one out later) or more often by use of GPS or similar
> Longitude and
> Latitude coordinates.
>
> My desire is to be as thorough as possible with what is actually stored
> and
> 'fill in the blanks' for the user only requiring them to fill in an
> 'either/or'
> type scenario. (use of an address OR long/lat coordinates)
>
> Thus I am looking for some way to translate one to the other and back
> again.
> (address/zip/city to long/lat, or long/lat to
> zip/city/county/state/etc.)
> Ultimately I want to include at least canada and possibly international
> locations (although I will likely use different tools for handling
> those).
>
> I've started looking at some of the services available at USPS and
> zip-codes.com. I'll start looking at map-services next as I would also
> like to
> be able to generate maps for people as well as possibly have them select
> locations on a map rather than enter the specific data. (ugh - I have a
> feeling
> that might be a nightmare)
>
> Finally, I'm sure if I can get something to work for the above mentioned
> translations (so I can store at least an approximate long/lat for all
> locations) then I can find the math myself to calculate distances, but I
> would
> be curious to know if any packages for such already exist. I did a
> quick
> search of perl but only found one CPAN tool that appeared to do Long/Lat
> calculations and it's not one included in the standard CPAN supported
> downloads.
>
> All help is appreciated.
>
> SW
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
>
> - - - - - - - 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.
>
>

--
Alec Brecher
AtomD / E Research Resources
office: 802 253-8908
http://www.atomd.com

RE: A common perl script for different database platforms

am 27.02.2006 23:26:32 von Hetal.Soni

=20

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.

Any suggestion?

Thanks again,
Hetal.

-----Original Message-----
From: Alexander Foken [mailto:alexander@foken.de]=20
Sent: Sunday, February 26, 2006 1:16 AM
To: dbi-users@perl.org
Cc: Hetal Soni
Subject: Re: A common perl script for different database platforms

Right. And to explain why this does not work:

Perl handles "use" at compile time, not at runtime. "use WhatEver" is
roughly equivalent to "BEGIN { require WhatEver; WhatEver->import() if=20=

WhatEver->can('import'); }", so you always use both DBD::Oracle and
DBD::DB2, no matter what $opt_p contains.

If you want to load a module at runtime, use require.
If you want to load a DBI driver (DBD::*) at runtime, let DBI handle it.

Alexander

Tyler MacDonald wrote:

>Hetal Soni wrote:
> =20
>
>>Below is code lines to use library for Oracle or DB2:
>>=20
>>if ($opt_p eq "O") {
>>$DBType =3D "Oracle";
>>use DBD::Oracle;
>>};
>>
>>if ($opt_p eq "D") {
>>$DBType =3D "DB2";
>> use DBD::DB2;
>>};
>>
>>If I comment "use DBD::DB2;" line out and then compile it it works
fine.
>> =20
>>
>
> You don't have to "use" a DBD:: driver to connect to it; when
you
>call DBI's "connect" method, it will do that for you. Try removing both
>"use" lines above and see if that solves it.
>
> Cheers,
> Tyler
> =20
>


--=20
Alexander Foken
mailto:alexander@foken.de http://www.foken.de/alexander/



NOTICE: This email message is for the sole use of the intended recipient(=
s) and may contain confidential and privileged information. Any unauthori=
zed review, use, disclosure or distribution is strictly prohibited. If yo=
u are not the intended recipient, please contact the sender by reply emai=
l and destroy all copies and attachments of the original message.

RE: A common perl script for different database platforms

am 27.02.2006 23:30:18 von Will.Rutherdale

You still need this line:

use DBI;

Do you have that still?

-Will


-----Original Message-----
From: Hetal Soni [mailto:Hetal.Soni@splwg.com]=20
Sent: Monday 27 February 2006 17:27
To: Alexander Foken; dbi-users@perl.org
Subject: RE: A common perl script for different database platforms


=20

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.

Any suggestion?

Thanks again,
Hetal.

-----Original Message-----
From: Alexander Foken [mailto:alexander@foken.de]=20
Sent: Sunday, February 26, 2006 1:16 AM
To: dbi-users@perl.org
Cc: Hetal Soni
Subject: Re: A common perl script for different database platforms

Right. And to explain why this does not work:

Perl handles "use" at compile time, not at runtime. "use WhatEver" is
roughly equivalent to "BEGIN { require WhatEver; WhatEver->import() if=20
WhatEver->can('import'); }", so you always use both DBD::Oracle and
DBD::DB2, no matter what $opt_p contains.

If you want to load a module at runtime, use require.
If you want to load a DBI driver (DBD::*) at runtime, let DBI handle it.

Alexander

Tyler MacDonald wrote:

>Hetal Soni wrote:
> =20
>
>>Below is code lines to use library for Oracle or DB2:
>>=20
>>if ($opt_p eq "O") {
>>$DBType =3D "Oracle";
>>use DBD::Oracle;
>>};
>>
>>if ($opt_p eq "D") {
>>$DBType =3D "DB2";
>> use DBD::DB2;
>>};
>>
>>If I comment "use DBD::DB2;" line out and then compile it it works
fine.
>> =20
>>
>
> You don't have to "use" a DBD:: driver to connect to it; when
you
>call DBI's "connect" method, it will do that for you. Try removing both
>"use" lines above and see if that solves it.
>
> Cheers,
> Tyler
> =20
>


--=20
Alexander Foken
mailto:alexander@foken.de http://www.foken.de/alexander/



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. - - - - - - - =20
This e-mail and any attachments may contain information which is confidenti=
al, proprietary, privileged or otherwise protected by law. The information =
is solely intended for the named addressee (or a person responsible for del=
ivering it to the addressee). If you are not the intended recipient of this=
message, you are not authorized to read, print, retain, copy or disseminat=
e 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.

Re: A common perl script for different database platforms

am 27.02.2006 23:31:38 von clive

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?

RE: A common perl script for different database platforms

am 27.02.2006 23:36:57 von Hetal.Soni

This how I connect to db:

my $dbh =3D DBI->connect("DBI:$DBType:$DbName", "$User", "$Pwd", {
AutoCommit =3D> 0, PrintError =3D> 0, RaiseError =3D> 0 }) or print
"\nCouldn't connect to the database $DBType $DbName $User - " .
DBI->errstr;=20

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@serendipita.com]=20
Sent: Monday, February 27, 2006 5:32 PM
To: Hetal Soni
Cc: dbi-users@perl.org
Subject: Re: A common perl script for different database platforms

Hetal Soni wrote:
> =20
>
> Thanks for your input guys.
>
> I removed both "use:DBD::Oralce" and "use"DBD:DB2" lines and now=20
> getting following error:
>
> Can't locate object method "connect" via package "DBI" (perhaps you=20
> forgot to lo ad "DBI"?) at tmp1.plx line 58.
>
> =20
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 unauthori=
zed review, use, disclosure or distribution is strictly prohibited. If yo=
u are not the intended recipient, please contact the sender by reply emai=
l and destroy all copies and attachments of the original message.

RE: A common perl script for different database platforms

am 27.02.2006 23:41:33 von Will.Rutherdale

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@splwg.com]=20
Sent: Monday 27 February 2006 17:37
To: Clive Eisen
Cc: dbi-users@perl.org
Subject: RE: A common perl script for different database platforms


This how I connect to db:

my $dbh =3D DBI->connect("DBI:$DBType:$DbName", "$User", "$Pwd", {
AutoCommit =3D> 0, PrintError =3D> 0, RaiseError =3D> 0 }) or print
"\nCouldn't connect to the database $DBType $DbName $User - " .
DBI->errstr;=20

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@serendipita.com]=20
Sent: Monday, February 27, 2006 5:32 PM
To: Hetal Soni
Cc: dbi-users@perl.org
Subject: Re: A common perl script for different database platforms

Hetal Soni wrote:
> =20
>
> Thanks for your input guys.
>
> I removed both "use:DBD::Oralce" and "use"DBD:DB2" lines and now=20
> getting following error:
>
> Can't locate object method "connect" via package "DBI" (perhaps you=20
> forgot to lo ad "DBI"?) at tmp1.plx line 58.
>
> =20
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. - - - - - - - =20
This e-mail and any attachments may contain information which is confidenti=
al, proprietary, privileged or otherwise protected by law. The information =
is solely intended for the named addressee (or a person responsible for del=
ivering it to the addressee). If you are not the intended recipient of this=
message, you are not authorized to read, print, retain, copy or disseminat=
e 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.

Re: A common perl script for different database platforms

am 27.02.2006 23:46:45 von me

------=_Part_15602_33231637.1141080405572
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

They mean, your script needs to look like:

use DBI;
my $dbh =3D DBI->connect("DBI:$DBType:$DbName", "$User", "$Pwd", {AutoCommi=
t
=3D> 0, PrintError =3D> 0, RaiseError =3D> 0 }) or print"\nCouldn't connect=
to the
database $DBType $DbName $User - " .DBI->errstr;

J

On 2/27/06, Hetal Soni wrote:
>
> This how I connect to db:
>
> my $dbh =3D DBI->connect("DBI:$DBType:$DbName", "$User", "$Pwd", {
> AutoCommit =3D> 0, PrintError =3D> 0, RaiseError =3D> 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@serendipita.com]
> Sent: Monday, February 27, 2006 5:32 PM
> To: Hetal Soni
> Cc: dbi-users@perl.org
> 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 prohibit=
ed.
> If you are not the intended recipient, please contact the sender by reply
> email and destroy all copies and attachments of the original message.
>

------=_Part_15602_33231637.1141080405572--

RE: A common perl script for different database platforms

am 01.03.2006 22:50:01 von Hetal.Soni

It worked with "use DBI".

Thanks all for the input, appreciate it=20

-----Original Message-----
From: Clive Eisen [mailto:clive@serendipita.com]=20
Sent: Monday, February 27, 2006 5:32 PM
To: Hetal Soni
Cc: dbi-users@perl.org
Subject: Re: A common perl script for different database platforms

Hetal Soni wrote:
> =20
>
> Thanks for your input guys.
>
> I removed both "use:DBD::Oralce" and "use"DBD:DB2" lines and now=20
> getting following error:
>
> Can't locate object method "connect" via package "DBI" (perhaps you=20
> forgot to lo ad "DBI"?) at tmp1.plx line 58.
>
> =20
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 unauthori=
zed review, use, disclosure or distribution is strictly prohibited. If yo=
u are not the intended recipient, please contact the sender by reply emai=
l and destroy all copies and attachments of the original message.