You should place some logic such as this in your application.cfm

<cfif cgi.server_name eq '127.0.0.1'>
 <cfset request.DSN = "local_dsn_name">
<cfelse>
 <cfset request.DSN = "server_dsn_name">
</cfif>

then just use #request.DSN# for your datasource attribute in your queries
and you are all set.  =)

Nate Nielsen
[EMAIL PROTECTED]

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, June 02, 2002 10:44 AM
Subject: Re: developing on local machine


> Well my server guy had me name all my stuff identically to what is on the
> server.  E.g., same datasource name.  So how would I differentiate between
> the local datasource named X and the remote datasource named X?  [I
> thought if I were running a script in a browser page on the 127.0.0.1
machine
> (rather than the remote webserver), it would pull from the local.]  Palyne
>
> On 1 Jun 2002 at 20:09, Jeff Mayfield wrote:
>
> > Look at your DSN configuration, does it point to (local) or the remote
server?
> >
> > At 6/1/2002 06:59 PM, you wrote:
> > >Hi list,
> > >
> > >I recently began using my own SQL-Server/ColdFusion etc. offline for
> > >development, per my server firm's new policy on that.  I'm publicly
hosted
> > >and
> > >had been doing it online until now.  I do have a connection (not
constant) to
> > >my datasource and can export my data etc. to my own local system, which
> > >I've done.
> > >
> > >I just discovered that when I am doing something on my OWN system, it
is
> > >updating the tables on the remote server!  I thought it would just be
> > >updating
> > >my 'local' copy.  I haven't worried about what I was doing on my 'copy'
> > >here...
> > >er... sheesh. Why would this be?  Isn't the point of local devel to do
it
> > >locally?
> > >
> > >
> > >When SQL Server knows that the remote datasource is the same as yours
> > >locally as it exported to you, does it automatically update the remote
tables
> > >with the new data?  What if the remote server was not connected at that
time -
> > >  would it wait and do it when it was?
> > >
> > >I'm confused.  I thought I was working 'locally'.  Would appreciate any
> > >explanation someone might have.
> > >
> > >Best regards,
> > >Palyne
> > >
> > >~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > >Palyne Gaenir
> > >Science Horizon Web Media
> > >www.sciencehorizon.com
> > >[EMAIL PROTECTED]
> > >cel 918.533.3765  tf 877.316.0763
> > >
> > >
> > >
> > >
> >
>-------------------------------------------------------------------------
> > >This email server is running an evaluation copy of the MailShield anti-
> > >spam software. Please contact your email administrator if you have any
> > >questions about this message. MailShield product info:
www.mailshield.com
> > >
> > >-----------------------------------------------
> > >To post, send email to [EMAIL PROTECTED]
> > >To subscribe / unsubscribe: http://www.dfwcfug.org
> >
> >
>
> -------------------------------------------------------------------------
> > This email server is running an evaluation copy of the MailShield anti-
> > spam software. Please contact your email administrator if you have any
> > questions about this message. MailShield product info:
www.mailshield.com
> >
> > -----------------------------------------------
> > To post, send email to [EMAIL PROTECTED]
> > To subscribe / unsubscribe: http://www.dfwcfug.org
> >
>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Palyne Gaenir
> Science Horizon Web Media
> www.sciencehorizon.com
> [EMAIL PROTECTED]
> cel 918.533.3765  tf 877.316.0763
>
>
>
>
> -------------------------------------------------------------------------
> This email server is running an evaluation copy of the MailShield anti-
> spam software. Please contact your email administrator if you have any
> questions about this message. MailShield product info: www.mailshield.com
>
> -----------------------------------------------
> To post, send email to [EMAIL PROTECTED]
> To subscribe / unsubscribe: http://www.dfwcfug.org



-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com

-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org

Reply via email to