• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

managing data sources

New Here ,
Feb 05, 2008 Feb 05, 2008

Copy link to clipboard

Copied

can a data source be created/modified from a CFML template? If so, how?
TOPICS
Advanced techniques

Views

348

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 05, 2008 Feb 05, 2008

Copy link to clipboard

Copied


You can create and manage datasources from withing cfml pages, but (there is always a BUT isn't there) you need to use the coldfusion administrator api in order to do it. If you are on a hosting environment I can pretty much bet that you won't have access to it (you need to have the admin password).

If you do have then you can explore the adminapi by going to http://<webroot>/cfide/adminapi/datasource.cfc, then enter in the admin password or rds password this will allow you to browse the available functions. Depending on the type of database connection that you want to manage or create there is a SET function e.g. setMSSQL or setMySQL.

The instructions are pretty good so you should be able to figure out what you have to pass to the function.



Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 05, 2008 Feb 05, 2008

Copy link to clipboard

Copied

I am able to get to the api docs....

Are there any examples available on how to invoke these functions?

Never mind, i found the api documentation...

thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 05, 2008 Feb 05, 2008

Copy link to clipboard

Copied

mfoster wrote:
> can a data source be created/modified from a CFML template? If so, how?

If you are very, Very, VERY daring and gutsy one could theoretically
modify the XML files that the settings are stored in.

I would NOT recommend this, I would point out it is EXTREMELY risky.
But it is theoretically possible.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 05, 2008 Feb 05, 2008

Copy link to clipboard

Copied

LATEST

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation