Brent,

Use the AdminAPI instead of accessing the factory directly. The adminapi
will provide the ability to create/delete datasources. The underlining
factory could change with with future releases of CF and the AdminAPI is
there to provide a stable level of abstraction that you can use.

http://livedocs.adobe.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/w
whelp.htm?context=ColdFusion_Documentation&file=00001734.htm

John
[EMAIL PROTECTED]

 

-----Original Message-----
From: Brent Shaub [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 09, 2007 9:55 AM
To: CF-Talk
Subject: Programmatically deleting a datasource

I found some terrific code to access the admin api on House of Fusion here.
Thanks to all!  In experimenting with the methods, I can successfully create
a SQL datasource.  What I'm having trouble doing is deleting it.

factory.datasourceservice.removeDatasource(theDatasourceName)

seems the logically choice.  In doing so, the datasource gets deleted from
factory.datasourceservice.getNames() but not from
factory.datasourceservice.getDatasources().  The datasource will appear in
the CF Admin list, but errors if I try to edit or verify it.  Something
changed, just not everything.

Does anyone know what piece I might be missing?  Thanks in advance!



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Macromedia ColdFusion MX7
Upgrade to MX7 & experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion?sdid=RVJW

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:283280
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to