[CDBI] pass in database name from application

[prev] [thread] [next] [Date index for 2005/10/10]

From: Thomas Kwan \(eTechfocus\)
Subject: [CDBI] pass in database name from application
Date: 04:15 on 10 Oct 2005
This is a multi-part message in MIME format.

--===============0633254276==
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0639_01C5CD16.83B15A20"

This is a multi-part message in MIME format.

------=_NextPart_000_0639_01C5CD16.83B15A20
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello there,

Is there anyone knows how to make a Class::DBI object
reuseable with multiple databases within the same=20
process?

For example, I want to build a User class that extends
Class::DBI. Then, I want to read a User object from
database A and a User object from database B, using
the same User class ideally. Then, I want to compare=20
them.

How can I build reuseable DBI object API without hardcoding
the database name, user id, password, table name in
the class?

thanks

------=_NextPart_000_0639_01C5CD16.83B15A20
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2722" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hello there,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Is there anyone knows how to make a =
Class::DBI=20
object</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>reuseable with multiple databases =
within the same=20
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>process?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>For example, I want to build a User =
class that=20
extends</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Class::DBI. Then,&nbsp;I want to read a =
User object=20
from</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>database A and a User object from =
database B,=20
using</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>the same User class ideally. Then, =
</FONT><FONT=20
face=3DArial size=3D2>I want to compare </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>them.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>How can I build reuseable DBI object =
API without=20
hardcoding</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>the database name, user id, password, =
table name=20
in</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>the class?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>thanks</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_0639_01C5CD16.83B15A20--




--===============0633254276==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi

--===============0633254276==--



(message missing)

[CDBI] pass in database name from application
Thomas Kwan \(eTechfocus\) 04:15 on 10 Oct 2005

Re: [CDBI] pass in database name from application
Steven Mackenzie 09:09 on 10 Oct 2005

Re: [CDBI] pass in database name from application
William Ross 09:35 on 10 Oct 2005

[CDBI] Re: pass in database name from application
Edward J. Sabol 19:36 on 10 Oct 2005

Re: [CDBI] Re: pass in database name from application
Christopher H. Laco 19:44 on 10 Oct 2005

Generated at 15:14 on 14 Oct 2005 by mariachi v0.52