This content has been marked as final. Show 4 replies
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.
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...
> 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.