thanks dave
figured it was something like that
Dave

www.Real-Singles.com (coming soon)
----- Original Message -----
From: "Dave Watts" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, January 31, 2003 9:12 PM
Subject: RE: setting db in the application template


> > can I add a connection in my Application.cfm template
> > for my db connection?
> > what I am doing is creating the db on my local machine
> > using access 2002 which I don't use a username or password.
> > When I go live I will upsize it to ms sql 2000 on the
> > live server which of course will need a username and
> > password. So I was thinking that I could make the
> > connection in the application.cfm template then only
> > have to make the db change there when I go live. Is
> > that correct? If so what would be the correct way to
> > do it? I was thinking that I'd just have to do a
> > <cfset database="#mydb#"> then when I go live add the
> > username and password but my heads up my bumm at the
> > moment so I don't know
>
> All you have to do is create a new datasource in the CF Administrator,
then
> use that datasource in your application. To make this as easy as possible,
> you might create a variable in your Application.cfm file containing the
> datasource name:
>
> <cfset dsn = "MyAccessDB">
>
> Then, within all your CFQUERY tags, you could just do this:
>
> <cfquery name="qDoSomething" datasource="#Variables.dsn#">
>
> When you switch to SQL Server, you'd just change your variable in
> Application.cfm to the new datasource.
>
> Dave Watts, CTO, Fig Leaf Software
> http://www.figleaf.com/
> voice: (202) 797-5496
> fax: (202) 797-5444
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to