Use Railo's built in cfadmin tag to manipulate datasources
This is so cool! I had no idea that Railo had a
There's a mention of it here and here, but very little information is offered on it. I only found out about it when Michael gave an example of using it to work with datasources on the Railo Talk list this morning. (I can't seem to find the thread in the Railo Google Group, or I would post it. )
Here's the example code Michael posted:
action="verifyDatasource"
type="web"
password="pwd"
dbusername="dbun"
dbpassword="dbpw"
name="myDatasource">
<cfadmin
action="removeDatasource"
type="web"
password="pwd"
name="myDatasource">
<cfadmin
action="getDatasources"
type="web"
password="pwd"
returnVariable="datasources">
<cfadmin
action="getDatasource"
type="web"
password="pwd"
name="myDatasource"
returnVariable="ds">
<cfadmin
action="updateDatasource"
type="web"
password="pwd"
classname="#driver.getClass()#"
dsn="#driver.getDSN()#"
name="#form.name#"
host="#form.host#"
database="#form.database#"
port="#form.port#"
dbusername="#form.username#"
dbpassword="#form.password#"
connectionLimit="#form.connectionLimit#"
connectionTimeout="#form.connectionTimeout#"
blob="#getForm('blob',false)#"
clob="#getForm('clob',false)#"
allowed_select="#getForm('allowed_select',false)#"
allowed_insert="#getForm('allowed_insert',false)#"
allowed_update="#getForm('allowed_update',false)#"
allowed_delete="#getForm('allowed_delete',false)#"
allowed_alter="#getForm('allowed_alter',false)#"
allowed_drop="#getForm('allowed_drop',false)#"
allowed_revoke="#getForm('allowed_revoke',false)#"
allowed_create="#getForm('allowed_create',false)#"
allowed_grant="#getForm('allowed_grant',false)#"
custom="#custom#">
That's about all I know of Railo's


Gert Franz
Railo