PROTECTED]
Sent: Thursday, December 13, 2001 3:46 PM
Subject: RE: Can we have two datasources with the same name?
If I understand what you are asking, why do you not just set your DSN as
an Application variable?
cfset Application.DataSource = dev or cfset Application.DataSource =
test
You
]]
Sent: Friday, December 14, 2001 9:42 AM
To: CF-Talk
Subject: Re: Can we have two datasources with the same name?
I used to make that same mistake. However, if you use #application.dsn#,
that means that you have to lock every query - this really hurts
performance. Use a non-shared scope (like
]]
Sent: Friday, December 14, 2001 9:42 AM
To: CF-Talk
Subject: Re: Can we have two datasources with the same name?
I used to make that same mistake. However, if you use #application.dsn#,
that means that you have to lock every query - this really hurts
performance. Use a non-shared scope
Hi.
Suppose I have a datasource datasource1 pointing to
Database1 on a SQL Server called test.
Can I have another datasource called datasource1
pointing to Database1 on SQL Server called dev?
The datasource1 currently works fine on
http://localhost/
I have created a virtual site called
Create a template and add it to all of the files needed. All you need it
one line.
datasource.cfm
cfset datasource = changethenameofthedatasourcehere
Then for your queries:
cfquery name=whatever datasource=#datasource#
select *
from table
/cfquery
So the files would look like this:
PROTECTED]
-Original Message-
From: bajaria aslam [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 13, 2001 3:36 PM
To: CF-Talk
Subject: Can we have two datasources with the same name?
Hi.
Suppose I have a datasource datasource1 pointing to
Database1 on a SQL Server called test.
Can I
I do something similar, but in application.cfm. That way I don't have to change a
bunch of individual templates. Instead of a CFIF, you could use a CFSWITCH to choose
between dev, test and live servers so no code needs to be changed anywhere as you move
from server to server.
CFIF (NOT
: bajaria aslam [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 13, 2001 3:36 PM
To: CF-Talk
Subject: Can we have two datasources with the same name?
Hi.
Suppose I have a datasource datasource1 pointing to
Database1 on a SQL Server called test.
Can I have another datasource called datasource1
Put the datasource in your Application.cfm file that way you only have to
comment and uncomment one line of code
On Thu, 13 Dec 2001, bajaria aslam wrote:
Hi.
Suppose I have a datasource datasource1 pointing to
Database1 on a SQL Server called test.
Can I have another datasource called
9 matches
Mail list logo