Ask a Question related to Coldfusion - Getting Started, Design and Development.
-
doug777 #1
connecting to dsn on server
I have a website on a shared server at CrystalTech.
They say: Your data source verified. The connection string you should
use in your code is "dsn=dbname;uid=username;pwd=mypwd;network=dbxxxxx x"
I tried the following
<cfset Request.MainDSN = "exactly as above">
But neither this, nor above without dsn=, works.
How then should the code be written in cfapplication?
Doug
doug777 Guest
-
Connecting to SQL server
Are settings configured wrong? Of course both possible reasons given are both true, that is the web services is up and running and the ODBC DSN... -
Connecting SQL Server with DW using ASP.NET VB
Hello All, I'm trying to connect SQL Server with DW using ASP.NET VB using several connection strings and getting different error messages. The... -
Connecting SQL Server to DW
Hello I'm I have a project that is due shortly and I have been trying for about a week to connect SQL Server with DW with no success. I have read... -
Connecting to SQL Server from ASP.NET
Hi, Hi I have SQL Server Instances running on same machine. How do i connect to the "SecondInstance" of SQL Server on a machine from ASP.NET? ... -
Web Server connecting to Informix Server
I am running an OLTP system with Informix 7.3 IDS on HPUX. We are considering writing some web interfaces to connect to the database. At first we... -
doug777 #2
Re: connecting to dsn on server
Sorry, last line should say:
How then should the code be written in application.cfm?
Doug
doug777 Guest
-
mpwoodward *TMM* #3
Re: connecting to dsn on server
doug777 wrote:
That looks like the code you'd use to connect in ASP, not in CF. In CF> I have a website on a shared server at CrystalTech.
>
> They say: Your data source verified. The connection string you should
> use in your code is "dsn=dbname;uid=username;pwd=mypwd;network=dbxxxxx x"
>
> I tried the following
>
> <cfset Request.MainDSN = "exactly as above">
>
> But neither this, nor above without dsn=, works.
>
> How then should the code be written in cfapplication?
you would set the DSN, user name, and password as separate variables.
(You don't need network at all.)
<cfset Application.DSN = "your_datasource_name" />
<cfset Application.dbUser = "your_database_username" />
<cfset Application.dbPassword = "your_database_password" />
Then when you run a query:
<cfquery name="whatever" datasource="#Application.DSN#"
username="#Application.dbUser#" password="#Application.dbPassword#">
etc. ...
Hope that helps,
Matt
--
Matt Woodward
Team Macromedia - ColdFusion
mpwoodward *TMM* Guest
-
doug777 #4
Re: connecting to dsn on server
Thanks so much for that. I don't think I would ever have guessed that
that was the way to do it.
May I ask you another question ...
I originally developed the site all in the main directory.
When I moved all the .cfm files into a sub-directory, cffiles, DW
changed the code in my login security on every page (no other links were
changed) from:
MM_failureURL="failpage.cfm?etc
to:
MM_failureURL="../failpage.cfm?etc
although all cfm pages are in this new directory.
Is this right or should it be changed back to the original?
Doug
doug777 Guest
-
mpwoodward *TMM* #5
Re: connecting to dsn on server
doug777 wrote:
Yes, if you moved them to a subdirectory then the "../" means "go up a> Thanks so much for that. I don't think I would ever have guessed that
> that was the way to do it.
>
> May I ask you another question ...
>
> I originally developed the site all in the main directory.
>
> When I moved all the .cfm files into a sub-directory, cffiles, DW
> changed the code in my login security on every page (no other links were
> changed) from:
>
> MM_failureURL="failpage.cfm?etc
>
> to:
>
> MM_failureURL="../failpage.cfm?etc
>
> although all cfm pages are in this new directory.
>
> Is this right or should it be changed back to the original?
>
> Doug
directory from where you are to find this page." That should be correct.
Matt
--
Matt Woodward
Team Macromedia - ColdFusion
mpwoodward *TMM* Guest
-
doug777 #6
Re: connecting to dsn on server
Sorry, but I still don't understand why it should want to go up a
directory, when failpage.cfm is in the same directory as all the other
..cfm files.
Doug
mpwoodward *TMM* wrote:
> doug777 wrote:
>>>> Thanks so much for that. I don't think I would ever have guessed that
>> that was the way to do it.
>>
>> May I ask you another question ...
>>
>> I originally developed the site all in the main directory.
>>
>> When I moved all the .cfm files into a sub-directory, cffiles, DW
>> changed the code in my login security on every page (no other links
>> were changed) from:
>>
>> MM_failureURL="failpage.cfm?etc
>>
>> to:
>>
>> MM_failureURL="../failpage.cfm?etc
>>
>> although all cfm pages are in this new directory.
>>
>> Is this right or should it be changed back to the original?
>>
>> Doug
>
> Yes, if you moved them to a subdirectory then the "../" means "go up a
> directory from where you are to find this page." That should be correct.
>
> Matt
>doug777 Guest
-
mpwoodward *TMM* #7
Re: connecting to dsn on server
doug777 wrote:
Sorry, I didn't realize that failpage was in the same directory. If> Sorry, but I still don't understand why it should want to go up a
> directory, when failpage.cfm is in the same directory as all the other
> .cfm files.
that's the case then no, it shouldn't be mapped that way. If it can't
find the file then that's probably why. I have no clue how the
Dreamweaver stuff works so I'm not familiar with the details of what it
does for login stuff.
Matt
--
Matt Woodward
Team Macromedia - ColdFusion
mpwoodward *TMM* Guest
-
doug777 #8
Re: connecting to dsn on server
Your help much appreciated. Thanks very much.
Doug
doug777 Guest



Reply With Quote

