You get a "no SQL specificied" error - CF won't try to make a connection for no reason.
Jim Davis > -----Original Message----- > From: CF Dude [mailto:[EMAIL PROTECTED] > Sent: Friday, June 27, 2003 2:39 PM > To: CF-Talk > Subject: Re: Is there a way to test to see if a data source exists? > > I consider the "right" query as an obvious, but now I do have another > question. > > What would happen if, in this scenario, you just used an empty <cfquery> > tag? > > EG : > > <cftry> > <cfquery datasource=#doesThisExist#> </cfquery> > <cfcatch type="database"> > What would happen if no query was specified? > </cfcatch> > </cftry> > > I'd like to assume that cfServer still tries to make a physical connection > before running the query. Or does it check > for the existence of a query first, and then connect? > > Eric > > ----- Original Message ----- > From: "Jim Davis" <[EMAIL PROTECTED]> > > The "right" query to use may different with database and connection type. > For example in ODBC the message "data source not found" us returned and > you > can search for it, but this message may not come back for other drivers > (such as OLE DB or JDBC). > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4