Skip to main content
Participant
February 5, 2008
Question

managing data sources

  • February 5, 2008
  • 4 replies
  • 417 views
can a data source be created/modified from a CFML template? If so, how?
This topic has been closed for replies.

4 replies

Inspiring
February 5, 2008
Inspiring
February 5, 2008
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.

mfosterAuthor
Participant
February 5, 2008
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
Participating Frequently
February 5, 2008

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.