Re: [PEPr] +1 for Database::DB_odbtp

From: Date: Fri, 10 Sep 2004 05:25:35 +0000
Subject: Re: [PEPr] +1 for Database::DB_odbtp
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-33327@lists.php.net to get a copy of this message
On Thu, Sep 09, 2004 at 04:37:39PM -0400, Robert Twitty wrote: > danielc's conditional vote... > > > I don't like how the 'username' DSN element contains all of this > > information: $dsninfo['username'] = 'DRIVER={Microsoft Access Driver > > (*.mdb)};DBQ=c:\NorthWind.mdb;UID=admin;PWD=;'; > > That needs to be broken down into the proper elements in order to provide > > portability/comprehendability with DB. ... snip ... > The second method permits complete portability/compatibiltiy with DB's > connection scheme DB doesn't use a user interface file, so that's not portable. > The first method > is a bit more complicated, because it requires the specification of an > ODBC driver connect string that is passed directly to the ODBTP server. > Such a string cannot be easily broken down to match DB's paradigm. Sure it can. Have the user pass a DB standard DSN string OR array to connect, but then have your connect() function merge the data into the format necessary to make a connection to the server. That's what all of the drivers do. --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409

« previous php.pear.dev (#33327) next »