Check Data Source

2005-01-26 Thread cfhelp
What is the easiest way to check if a data source is available? I want to test in the Application.cfm file if a data source is reachable and set a true. Then load the site. Rick No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database:

RE: Check Data Source

2005-01-26 Thread Emmet McGovern
cftry cfquery datasource=dsn name=check Select * from table /cfquery cfcatch cfabort !-- or something else --- /cfcatch /cftry emmet -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 26, 2005 11:47 AM To: CF-Talk Subject: Check Data Source

RE: Check Data Source

2005-01-26 Thread Dave Watts
What is the easiest way to check if a data source is available? I want to test in the Application.cfm file if a data source is reachable and set a true. Then load the site. You can query the datasource within an exception handler: cftry cfquery ... ... /cfquery

RE: Check Data Source

2005-01-26 Thread Rick
Well that's simple enough...Thanks Dave, Emmet. I was trying to do an HTTP request into the admin area. Rick -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 26, 2005 11:31 AM To: CF-Talk Subject: RE: Check Data Source What is the easiest way

Re: Check Data Source

2005-01-26 Thread Qasim Rasheed
I guess you can use this function however be aware that it uses undocumented cf service factory. cfscript function verifyDatasource( dsn ){ return createObject('java', 'coldfusion.server.ServiceFactory').DataSourceService.verifyDataSource( arguments.dsn ); }