Dec 23, 2008

Extracting datasource information with CFML ( with javas help )

Ran into this a few days back and I though it was quite interesting. From within CFML code you can extract information about the datasources. I guess a possible use for this is compatible code ie if(mySQL) do MySQL else do MSSQL.

It works with Coldfusion 7 and 8 and it also works on the latest stable release of Railo with slightly less detail then Coldfusion. It didn’t work on Open Bluedragon though.




Original source: Brandon Purcell.

2 comments:

  1. Turns out there is a tag that will do this and its cleaner. cfdbinfo CFDBINFO

    ReplyDelete
  2. Directly use of ServiceFactory is discouraged as it is unsupported. The preferred means of accessing and modifying CF Administrator settings programatically is with the Admin API.

    See:
    http://livedocs.adobe.com/coldfusion/8/htmldocs/basiconfig_37.html

    ReplyDelete