TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [TCLUG:13524] perl DBI question....



Thanks, This is what I was looking for.  I couldn't find a DBI api reference
at www.perl.com

Cheers,  Thanks again!

Mark

> -----Original Message-----
> From:	Chris McKinley [SMTP:lamfada@lugh.net]
> Sent:	Thursday, February 10, 2000 11:08 AM
> To:	'tclug-list@mn-linux.org'
> Cc:	tclug-devel@mn-linux.org
> Subject:	RE: [TCLUG:13524] perl DBI question....
> 
> This is true, it is meant to be DB independant as much as possible.  The
> portion after the DBI:$driver in the data source argument is there to
> allow parameters to be passed by DBI into the DB that is being connected
> to.  To quote the perldoc for DBI, though:
> 
>            Examples of $data_source values:
> 
>              dbi:DriverName:database_name
>              dbi:DriverName:database_name@hostname:port
>              dbi:DriverName:database=database_name;host=hostname;port=port
> 
>            There is no standard for the text following the driver
>            name. Each driver is free to use whatever syntax it
>            wants. The only requirement the DBI makes is that all
>            the information is supplied in a single string.  You
>            must consult the documentation for the drivers you are
>            using for a description of the syntax they require.
>            (Where a driver author needs to define a syntax for
>            the data_source it is recommended that they follow the
>            ODBC style, the last example above.)
> 
> Thus, you must still at this point know what you are connecting you when
> creating you data source.
> 
> -Chris
> 
> On Thu, 10 Feb 2000, Schlough, Mark wrote:
> 
> <snip>
> 
> > 	I didn't think that DBI was specific to any database, I thought
> > that's what DBD:Whatever was for.  That's what's confusing.  What's
> > pertinent to DBI and what's for DBD:Whatever...
> 
> <more snip>
>  
> > > DBI:$driver:database=$database;host=$hostname;port=$port
> 
> <yet more snip>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tclug-list-unsubscribe@mn-linux.org
> For additional commands, e-mail: tclug-list-help@mn-linux.org