Re: Can we have two datasources with the same name?

2001-12-14 Thread BILLY CRAVENS
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

RE: Can we have two datasources with the same name?

2001-12-14 Thread Shawn Grover
]] 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

Re: Can we have two datasources with the same name?

2001-12-14 Thread BILLY CRAVENS
]] 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

Re: Can we have two datasources with the same name?

2001-12-13 Thread Jacob
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:

RE: Can we have two datasources with the same name?

2001-12-13 Thread Larry Juncker
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 would use whichever one you wanted while testing and then just change this one spot in your Application.cfm file when

Re: Can we have two datasources with the same name?

2001-12-13 Thread Matt Robertson
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

RE: Can we have two datasources with the same name?

2001-12-13 Thread Matt Robertson
If you use an app var in the CFQUERY statement you have to place an application-level CFLOCK around your query. I forgot to mention in my earlier post on this thread that I set request vars for the local and live settings in application.cfm. Does the same job w/o need for locking. No idea

Re: Can we have two datasources with the same name?

2001-12-13 Thread Alex
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