[Mydatabasepilot-cvs] MyDatabasePilot/Query dbGeneralInfo.cfm,1.2,1.3
Status: Alpha
Brought to you by:
nanoface
From: <nan...@us...> - 2003-05-17 06:21:56
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/Query In directory sc8-pr-cvs1:/tmp/cvs-serv3560/Query Modified Files: dbGeneralInfo.cfm Log Message: Internal Structure Changed: [ 739068 ] Convert Query/dbGeneralInfo.cfm to a CUSTOM TAG Index: dbGeneralInfo.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/Query/dbGeneralInfo.cfm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** dbGeneralInfo.cfm 13 Apr 2003 05:29:34 -0000 1.2 --- dbGeneralInfo.cfm 17 May 2003 06:21:53 -0000 1.3 *************** *** 1,15 **** <!---******************************************************************************************* * Copyright: MyDatabase Pilot is distributed under the terms of the GNU GPL license * ! * Template: Query/dbGeneralInfo.cfm * * Purpose: Creates a Record Set with General Information about the Database Server * ! * Requiremets: Connection Variables must already be set * ********************************************************************************************---> <!---||| Collect General Information about the Database Currently in use and the Database Server |||---> ! <!--- Initiate a Read Only lock to ensure the integrity of session variables ---> ! <cflock timeout=20 throwontimeout="no" type="readonly" scope="session"> ! <!--- Create Recordset with general database info ---> ! <cfquery name="dbGeneralInfo" datasource="#session.dataSource#" username="#session.userName#" password="#session.password#"> ! SELECT VERSION() AS version, NOW() AS serverTime, DATABASE() AS dbInUse; ! </cfquery> ! </cflock> \ No newline at end of file --- 1,23 ---- <!---******************************************************************************************* * Copyright: MyDatabase Pilot is distributed under the terms of the GNU GPL license * ! * Template: Query/dbGeneralInfo.cfm (CUSTOM TAG) * * Purpose: Creates a Record Set with General Information about the Database Server * ! * Inputs: - queryName (Required) * ! * - dataSource (Required) * ! * - userName (Required) * ! * - password (Required) * ! * Outputs: - queryName * ********************************************************************************************---> + <!---||| Check for existence of Required Attributes |||---> + <!---||| More user friendly error checking will be introduced in the BETA releases |||---> + <cfif NOT IsDefined("ATTRIBUTES.queryName")><CFABORT showerror="The queryName attribute is required when calling dbGeneralInfo custom tag."></cfif> + <cfif NOT IsDefined("ATTRIBUTES.dataSource")><CFABORT showerror="The dataSource attribute is required when calling dbGeneralInfo custom tag."></cfif> + <cfif NOT IsDefined("ATTRIBUTES.userName")><CFABORT showerror="The userName attribute is required when calling dbGeneralInfo custom tag."></cfif> + <cfif NOT IsDefined("ATTRIBUTES.password")><CFABORT showerror="The password attribute is required when calling dbGeneralInfo custom tag."></cfif> + <!---||| Collect General Information about the Database Currently in use and the Database Server |||---> ! <!--- Create Recordset with general database info ---> ! <cfquery name="CALLER.#ATTRIBUTES.queryName#" datasource="#ATTRIBUTES.dataSource#" username="#ATTRIBUTES.userName#" password="#ATTRIBUTES.password#"> ! SELECT VERSION() AS version, NOW() AS serverTime, DATABASE() AS dbInUse; ! </cfquery> \ No newline at end of file |