AdobeStock_455007340

Verifying Data Source Existence

Want to check that a data source has been defined and is useable? You could just try to use it and catch any generated errors. Or you could use the undocumented CF_IsColdFusionDataSource() function which takes the name of a data source as a parameter (within quotes) and returns TRUE if it is present and usable or FALSE if not. (Applies to: ColdFusion 4.x and 5)

Leave a Reply