Hi Steve,

In the case where you have the same TAF file being re-used by multiple sites
(with a different DataSource for each), then having Dynamic DataSources is
the way to go.

I wrote the following short article about how to set Dynamic DataSources for
your Search, Insert, Update, Delete and Direct_DBMS Actions for some of my
Witango friends.
http://xml-extra.net/webpage.xmlx?node=41

As for how to decide to assign your DataSource variables (dependant on the
current domain name), then you'll need a common file at the beginning of
each TAF (by way of an <@INCLUDE>, Branch Action or TCF) that picks up the
Requested <@DOMAIN> and then you could <@FILTER> an Array with all the
information.

You Array might look like this:

0: Domain, Username, Password;
1: www.site1.com, User1, Password1;
2: www.site2.com, User2, Password2;
3: www.site3.com, User3, Password3;
....

Then: <@assign local$thisDomainVariables value="<@filter
local$allDomainVariables expr='#Domain = <@DOMAIN>'>">

Then you have:

<@var local$thisDomainVariables[1,Username]> (for DB Username)
<@var local$thisDomainVariables[1,Password]> (for DB Password)

In my case, I use an XML file for the above to configure my DataSource info
for my sites. I run multiple sites all under one set of files.

Hope this helps. Cheers...

Scott Cadillac
http://xml-extra.net
[EMAIL PROTECTED]


----- Original Message -----
From: "Brent Skean" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 06, 2002 10:27 AM
Subject: Re: R:Tango Data Base Connection


> For any action that requires database connectivity, simply set the
> DataSource to the db you wish.  A taf/website doesn't point to any db, it
is
> the actions within the taf that determine which db will be used.
>
> You may use all your datasources in one taf or mix and match.
>
> For example, when doing a Direct DBMS, you will be asked for the
datasource,
> pick one and away you go.  Changing datasources is easy, just highlight
and
> pick a new source.
>
> Additionally, you can do dynamic datasource operations as well.  ie, you
> don't have to specify a database, you could point to a variable that you
> dynamically set whichever db you wish to use.
>
> Brent
>
> -----Original Message-----
> From: Fogelson, Steve <[EMAIL PROTECTED]>
> To: R:Base User Group (E-mail) <[EMAIL PROTECTED]>
> Date: Monday, May 06, 2002 9:42 AM
> Subject: R:Tango Data Base Connection
>
>
> >Hi, Thanks for the recommendations on dropdown list in R:Tango.
> >
> >I have a 6 databases on one server placed under folders DBases\Database1,
> >DBases\Database2, DBases\Database3, etc and 6 different web sites under
> >folders wwwroot\site1, wwwroot\site2, wwwroot\site3, etc.
> >
> >I have each database setup with the ODBC Data Source Administrator under
> >"System DSN".
> >
> >How does each web site know which database to access? I don't see
anything
> >in the .taf files.
> >
> >Thanks
> >
> >Steve Fogelson
> >Internet Commerce Solutions
> >
> >Example below.
> >
> ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
> ><HTML>
> ><HEAD>
> > <TITLE>User Login</TITLE>
> ></HEAD>
> ><H2>Please Login</H2>
> >Enter your User Name and Password to gain access to administer your
> >Listings!<br><br>
> ><BODY>
> ><FORM METHOD="POST"
>
>ACTION="/userlogin.taf?_function=list&_UserReference=330BC5DCFF500E103CD6A9
> C
> >6&_start=1">
> ><TABLE BORDER=0>
> ><TR VALIGN=TOP ALIGN=LEFT> <TD>
> > User Name:
> > </TD>
> >
> > <TD>
> > <INPUT NAME="U_User_Name" TYPE=TEXT SIZE=10 MAXLENGTH=10
> >VALUE="">
> > </TD>
> ></TR>
> ><TR VALIGN=TOP ALIGN=LEFT> <TD>
> > Password:
> > </TD>
> >
> > <TD>
> > <INPUT NAME="U_Password" TYPE=PASSWORD SIZE=10 MAXLENGTH=10
> >VALUE="">
> > </TD>
> ></TR>
> ></TABLE>
> ><INPUT TYPE=SUBMIT VALUE="Login"> <INPUT TYPE=RESET VALUE="Reset">
> ></FORM>
> ></BODY>
> ></HTML>
> >================================================
> >TO SEE MESSAGE POSTING GUIDELINES:
> >Send a plain text email to [EMAIL PROTECTED]
> >In the message body, put just two words: INTRO rbase-l
> >================================================
> >TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
> >In the message body, put just two words: UNSUBSCRIBE rbase-l
> >================================================
> >TO SEARCH ARCHIVES:
> >http://www.mail-archive.com/rbase-l%40sonetmail.com/
> >
>
> ================================================
> TO SEE MESSAGE POSTING GUIDELINES:
> Send a plain text email to [EMAIL PROTECTED]
> In the message body, put just two words: INTRO rbase-l
> ================================================
> TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
> In the message body, put just two words: UNSUBSCRIBE rbase-l
> ================================================
> TO SEARCH ARCHIVES:
> http://www.mail-archive.com/rbase-l%40sonetmail.com/
>

================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: INTRO rbase-l
================================================
TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: UNSUBSCRIBE rbase-l
================================================
TO SEARCH ARCHIVES:
http://www.mail-archive.com/rbase-l%40sonetmail.com/

Reply via email to