Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
frankjshin #1
When the database server is down...
Is there a way in ColdFusion to make a default page for the ColdFusion server
to display if the database server is down? That way, users wont be greeted
with an oracle error...(that is, only for pages where the database needs to be
accessed)...
Thanks,
Frank
frankjshin Guest
-
MX 7.01 Server Lockup due to down database
We have two datasources A) Standard SQL database, in the same domain B) SQL database pulled accross a VPN. Then we have a two load balanced CF... -
Flash with Database (MS SQL Server)
I want my flash (simple loop banner)banner to be connected with MS-SQL Server, so that i can store the counts/banner views by the client. This is... -
Connecting to database in different server
Hi all, I just installed Cold Fusion Developer edition in my PC, and I was wondering whether I can connect it to an Access database that resides... -
Is there a way of specify database name alias in the same server?
Scenario: IDS 9.40 4GL RDS application Linux Redhat 7.3 A unique database server (INFORMIXSERVER=myserver) 3 datatabases with identical... -
moving a database from one server to another.
NT 4.0, IDS 7.3 Hi all I'm moving a small database (4gb) from one server to another as a favour to a mate. I'm savvy with IDS on Unix but have... -
Neculai Macarie #2
Re: When the database server is down...
> Is there a way in ColdFusion to make a default page for the ColdFusion
servergreeted> to display if the database server is down? That way, users wont beto be> with an oracle error...(that is, only for pages where the database needsUse cftry/cfcatch around the queries.> accessed)...
--
<mack />
Neculai Macarie Guest
-
jorgepino #3
Re: When the database server is down...
you could try .
<cftry>
<Cfquery ......>
</Cfquery>
<cfcatch type="ANY">
<cfinclude template="errorpage.cfm">
</cfcatch>
</cftry>
jorgepino Guest
-
frankjshin #4
Re: When the database server is down...
Any idea why this wouldnt work? I am setting dberr to 'bad' if there is a db
error, but it doesnt seem to fly....
Frank
---------------------
<CFPARAM name="LoginSubmit" default="">
<CFPARAM name="i_userid" default ="">
<CFPARAM name="i_password" default ="">
<CFPARAM name="dberr" default = 'good'>
<cftry>
<CFIF LoginSubmit EQUAL "Login" and i_userid is not "">
<CFQUERY name="login1" datasource="ds" >
SELECT USERID, PASSWORD
FROM users
WHERE USERID='#i_userid#'
</CFQUERY>
<CFIF login1.USERID EQUAL i_userid AND login1.PASSWORD EQUAL i_password>
<CFSET session.user=i_userid>
</CFIF>
</CFIF>
<cfcatch type="database">
<cfset dberr is 'bad'>
</cfcatch>
</cftry>
<CFIF session.user EQUAL "unknown">
<CFOUTPUT>
<html>
<title>Page</title>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
<div align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="4"><table width="100%" border="0" cellspacing="o" cellpadding="o">
<tr>
<td align="left" valign="top" bgcolor="000000">
<cfinclude template="top.cfm"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="0%" rowspan="2" bgcolor="000000"><img src="shim.gif" height="6"
width="6"></td>
<td width="25%" rowspan="2" align="left" valign="top">
<cfinclude template="left.cfm"></td>
<td width="83%"><div align="left">Secure Login <br></div></td>
<td width="0" rowspan="2" bgcolor="000000"><img src="shim.gif" height="6"
width="6"></td>
</tr>
<tr>
<td align="left" valign="top"><div align="left">
<form name="login" method="post">
Data
<br>
Please enter your userid and password:
<cfif dberr is 'bad'>
The database server is down. Please try again later.
</cfif>
<br>
<br>
<input type="Text" name="i_userid" size="10">
<input type="Password" name="i_password">
<script language="Javascript">
<!--
document.login.i_userid.focus();
// -->
</script>
<br>
<input type="Submit" name="LoginSubmit" value="Login">
</font>
</form>
<br>
Note: You will be requested to log back in after 15 minutes of inactivity.
<br>
</div>
</td>
</tr>
<tr>
<td bgcolor="000000"> </td>
<td width="25%"> <p><br>
</p>
<p> </p></td>
<td> </td>
<td bgcolor="000000"> </td>
</tr>
<tr bgcolor="000000">
<td colspan="4"><img src="shim.gif" height="6" width="6"></td>
</tr>
</table>
</div>
<td valign="top" width="1"> </td>
</body>
</html>
</CFOUTPUT>
<CFABORT>
</CFIF>
frankjshin Guest
-
jorgepino #5
Re: When the database server is down...
<cfset dberr is 'bad'>
<cfset dberr = 'bad'>
jorgepino Guest
-
frankjshin #6
Re: When the database server is down...
Thanks! All is well now...
Frank
frankjshin Guest



Reply With Quote

