Software Technology Tips

Usually if we need to do some setting changes for ColdFusion application server then we log into ColdFusion Administrator using ColdFusion Admin GUI and change the settings. We can also do all the ColdFusion Administrator setting changes programmatically through ColdFusion Administrator API calls. ColdFusion provides us with around 12 components for different sections of the Administrator. We can call the different methods of different components to change the settings.

The basic component file containing the methods related to login and logout functionality for ColdFusion Administrator is "administrator.cfc". With the login method of this component, we can log into the Administrator by providing the ColdFusion Administrator login password. Once we log in, we can use the other methods of the components to perform other functionalities like creating datasource, creating mapping, modifying the debugging output settings etc.

Sample Example to create one ColdFusion datasource for SQL server with Administrator API call: 

 // Create an object of administrator component and call the login method
 adminObj = createObject("component","cfide.adminapi.administrator");
 adminObj.login("CFADMIN Password will go here");

 // Create an object of datasource component
 dsnObj = createObject("component","cfide.adminapi.datasource");

 // Setting up the parameter values for datasource
 stDSN = structNew();
 stDSN.driver = "MSSQLServer";"Datasource name will go here"; = "Database server name/IP will go here";
 stDSN.port = "1433";
 stDSN.database = "Database name will go here";
 stDSN.username = "Database access user name will go here";
 stDSN.password = "Database access password will go here";
 stDSN.description = "Datasource description will go here";

 // Create MSSQL datasource

 // Call logout method


For more information please visit:

Related Tags:


Author: Sankalan Panda

Related Pages

  • Coldfusion Development Expertise
  • Coldfusion Custom Projects


Let us Connect!

Awards and Achievements

Red Herringcolor DeloitteFast50 DB ZInnov1   Nascome  DB Stpi

This site uses cookies. We respect your privacy.copyright (c) Mindfire Solutions 2007-2015. Login