I need to be able to create a datasource automatically via the admin
api at application start up.

I am currently trying with the script below, but can't get past the
message

"CFML Runtime Error Login required to perform this action "

the setdatasource method throws the error, I can get a dump on myObj.

Any ideas?


<cfscript>
   createObject("component","bluedragon.adminapi.administrator").login
("admin");

   myObj = createObject("component","bluedragon.adminapi.datasource");

   // Required arguments for a data source.
   stDSN = structNew();
   stDSN.driver = "h2-embedded";
   stDSN.name="test";
   stDSN.database = "test";

   //Create a DSN.
   myObj.setdatasource(argumentCollection=stDSN);
</cfscript>


<cfoutput>
<cfdump var="#stDSN#">
</cfoutput>



--~--~---------~--~----~------------~-------~--~----~
Open BlueDragon Public Mailing List
 http://groups.google.com/group/openbd?hl=en
 official site @ http://www.openbluedragon.org/

!! save a network - trim replies before posting !!
-~----------~----~----~----~------~----~------~--~---

Reply via email to