develooper Front page | perl.beginners | Postings from December 2002

RE: migrating to oracle from mysql

Thread Previous
From:
Bob Showalter
Date:
December 27, 2002 05:45
Subject:
RE: migrating to oracle from mysql
Message ID:
2E4528861499D41199D200A0C9B15BC001D7E611@FRISTX
> -----Original Message-----
> From: Ramprasad [mailto:ramprasad@netcore.co.in]
> Sent: Friday, December 27, 2002 1:00 AM
> To: beginners@perl.org
> Subject: migrating to oracle from mysql
> 
> 
> Hello all ,
> 
>     I have been using mysql as a database and Mysql.pm helped 
> me do most 
> of the work easily. Now If my database changes to oracle ( which it 
> probably would ) then will I have to rewrite all the code.
> 
>    I just looked at DBI and found them to be too much of a 
> bother using 
> such a module. I am required to do *prepare* , *bind_param* , 
> *execute* 
> , *bind_column* etc just to get a simple sql select statement with a 
> where clause.

No, not true. This will return a set of rows in one statement:

   my $aref = $dbh->selectall_arrayref("select * from foo where bar='baz'");

> 
>     Are there any simpler interfaces to oracle

Use DBI. If you had been using DBI all along, your port to Oracle would be
much easier.

Consider also Class::DBI. See:
http://www.perl.com/pub/a/2002/11/27/classdbi.html>

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About