What to do if can't connect? - Posted (925 Views)
Average Member
SiSL
Posts: 671
671
Well, problem mostly occurs with people who has seperate servers with SQL and IIS

What code do you apply to your sites if connection failed ? <
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Forum Moderator
AnonJr
Posts: 5768
5768
Are you asking what to do if your Web server doesn't connect to the SQL Server? Your question is a little unclear...<
Posted
Average Member
SiSL
Posts: 671
671
Posted
Average Member
phy1729
Posts: 589
589
write "The SQL server is unreachable at this time" write the footer and exit is typically what I do or I write "<!--db-->" as the only thing to the page so I know where the error is.<
Posted
Forum Moderator
AnonJr
Posts: 5768
5768
All things being equal, its best to code so that it crashes responsibly. (yes, there is a right and a wrong way to crash)

I've started programming my apps with a quick connection check. If it fails the check it redirects to a page that explains that the problem is ours, not the users, etc. and apologizes for the downtime. In the background it logs some information for me so I can do a little analysis later. I'm working on expanding that code so I can crash more responsibly my self. smile<
 
You Must enter a message