Simple connection to database using Cold Fusion

mike333

Guppy
I am new to cold fusion, What the the correct way to connect to a database using cold fusion?

Using dreamweaver and set up for Cold Fusion looking in the database panel I get stuck on the "specify the RDS login information for Cold Fusion server."

Clicking on that brings up a "Login to ColdFusion Remote Develoment services (RDS)" box looking for a password.

Im lost, can anyone walk me though getting connected ?

Thanks

Mike
 
mike333 said:
I am new to cold fusion, What the the correct way to connect to a database using cold fusion?

Using dreamweaver and set up for Cold Fusion looking in the database panel I get stuck on the "specify the RDS login information for Cold Fusion server."

Clicking on that brings up a "Login to ColdFusion Remote Develoment services (RDS)" box looking for a password.

Im lost, can anyone walk me though getting connected ?

Thanks

Mike

Unless you're running a personal copy of ColdFusion Server on your local machine, you're not going to be able to connect to the RDS server. If you are then as SC has said you can just plug in you administrator password and connect to it.

Just as a note, it's a good idea to run a local server for development. You can download the evaluation version from Macromedia and when the evaluation expires it changes over to a single-IP version that you can use as a development server. That is the environment Dreamweaver expects.

If that's not what you're asking about, you need to specify the Datasource name, username and password (if you have them) for your datasource.


Hatton
 
I am a reseller and trying to develop on and connect to a datasource on one of my created accounts on JodoHost. I have a copy of cold fusion running locally, but I am trying to connect to a datasource on the Jodohost server. And I am looking for the (simple) a,b,c's

Thanks again
Mike
 
Hi Mike,

First,

You need to create your database. If you are using MSAccess, put your database in your domain root, behind the www.

If you are using a SQL database, create the database in your Hsphere control panel and set a user/pass.

Send a ticket to support, stating...
----------------------------------------------------------
1.)
The name and location of your access database, along with a user/pass if you set one for the mdb.

or...

The name, user, and pass, of your SQL database. Keep in mind that the name of your database and users will be prefixed by your login name such as mike333-sqldb and mike333-sqluser

2.)
The preferred name of your datasource to be entered in Jodohost's CF Administrator.
----------------------------------------------------------

Once you have received confirmation from support that your datasource has been created, you can call the datasource in your <cfquery datasource = "yourdatasource"> tag. But, it is better to set your web applications datasource globally in your application.cfm file, eg. <cfset dsn = "yourdatasource">. Then in all of your cfqueries, you can just call <cfquery datasource = "#dsn#">. Using this method allows you to easily change your datasource name without updating all of your templates.

I hope that helps you out Mike. I'm sure Hatton can fill in any of the blanks, he's a pro.

Brent
 
mike333 said:
I am a reseller and trying to develop on and connect to a datasource on one of my created accounts on JodoHost. I have a copy of cold fusion running locally, but I am trying to connect to a datasource on the Jodohost server. And I am looking for the (simple) a,b,c's

Okay, not a problem. Sometimes it's hard to figure out how simple or complex an answer to give from an initial post. We'll get ya straightened out, don't worry. :D

Right off the bat I need to ask the question of what kind of datasource you're talking about. If it's an Access database then you should have a local copy of the database. For MSSQL and MySQL you can use your local copy of CF Server to connect to the databases hosted at JodoHost.

Rather than retype everything, take a look at http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/datasou5.htm for the steps on setting up a DSN.

To connect to your JodoHost databases, you'll need to specify the server, database, username and password.

When you're ready to deploy to the Jodo servers you'll need to request a DSN be made on Jodohost's servers. You'll need to give them the database, username, password and what name you want them to assign to it. Do this via a support ticket.

Hope this helps!
 
mike333 said:
Thanks guys, that should be enough to get me rolling on playing around with CF.

Thanks again,
Mike
Not a problem, if you have any other CF questions be sure to post them! Good luck!
 
Back
Top