Hi Can anyone help me how to point two cold fusion application to the same datasource.

Is it possible to have two differnet applications pointing to the same database?

If so how to distinguish them?

Also if a same user access both the applications there should not be any conflicts.

Please reply the solution to <EMAIL SNIPPED>

Recommended Answers

All 4 Replies

Hi Can anyone help me how to point two cold fusion application to the same datasource.

Datasources are created at the CF server level. Just use the same datasource name in both applications.

Is it possible to have two differnet applications pointing to the same database?

Yes

If so how to distinguish them?

If you need to distinguish them, you probably shouldn't be using the same datasource for both.

Also if a same user access both the applications there should not be any conflicts.

No idea what you mean by that.

Please reply the solution to ...

No, it's more helpful to others if replies are posted on the forum.

Hi Can anyone help me how to point two cold fusion application to the same datasource.

Is it possible to have two differnet applications pointing to the same database?

If so how to distinguish them?

Also if a same user access both the applications there should not be any conflicts.

Please reply the solution to ckanthikiran@gmail.com

As arrgh said... coldfusion datasources are created in the CF administrator on the server.
Any application can call any datasource so the answer is yes... you can have two applications call/point to the same datasource.

The best way to distinguish between the two applications would be to setup and use different username and passwords for the database access. Providing a username and password in your cfquery tag will over-ride the default username and password for the datasource.

I still want to know what they mean by "there should not be any conflicts" ;-) Conflict how? The answer will determine how to best approach it.

Providing a username and password in your cfquery tag will over-ride the default username and password for the datasource.

That is a good thought. Though truthfully I've always been hesitant to pass around the username/password at the query level. Any idea if makes a difference? Is storing the login at the dsn level any more or less secure than at the cfquery level?

Like you arrgh, I would believe using the username/password at the query level is less secure. I would not put the cfquery tag as such in a .cfm file but have it call a cfcomponent file (.cfc) and/or store the username/password as an Application variable.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.