i am using Application.cfm and please do not ask t...
# cfml-beginners
s
i am using Application.cfm and please do not ask to update, because not in my hands 🙂 so how can i have a maintenance page which checks if there is an outrage depending on sql connection,
a
Which part of that do you not know how to do? Create a webpage? Check a DB connection? As per usual, showing some code so we have some idea of what you've got so far and pointing out where you are stuck would be helpful.
s
is this right
<cftry><cfset showPage = true><cfquery name="DBUP" datasource="datasource"> SELECT ID FROM dbo.Entry </cfquery><cfcatch type="database"><!--- The error code 0 is mentioned Datasource could not be found/exits. ---><cfif cfcatch.cause.errorcode eq 0 ><cfset showPage = false ><!--- Data source does not exists ---></cfif></cfcatch></cftry> cannot try yet because the sql server instanc3e is not ready but seems that might work
a
Let us know how you go once you can test it and work out what you might / might not need to do next...