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
Adam Cameron
02/17/2023, 3:11 PM
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
Simone
02/17/2023, 3:54 PM
is this right
Simone
02/17/2023, 3:54 PM
<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
Adam Cameron
02/17/2023, 4:31 PM
Let us know how you go once you can test it and work out what you might / might not need to do next...