[Mydatabasepilot-cvs] MyDatabasePilot/Query/LockRequired thisDatabaseName.cfm,1.1,1.2
Status: Alpha
Brought to you by:
nanoface
From: <nan...@us...> - 2003-05-18 04:58:44
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/Query/LockRequired In directory sc8-pr-cvs1:/tmp/cvs-serv15409/Query/LockRequired Modified Files: thisDatabaseName.cfm Log Message: Internal Structure Changed: [ 739341 ] Convert Query/LockRequired/thisDatabaseName.cfm to a CUSTOM TAG Index: thisDatabaseName.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/Query/LockRequired/thisDatabaseName.cfm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** thisDatabaseName.cfm 24 Apr 2003 03:07:10 -0000 1.1 --- thisDatabaseName.cfm 18 May 2003 04:46:12 -0000 1.2 *************** *** 1,13 **** <!---******************************************************************************************* * Copyright: MyDatabase Pilot is distributed under the terms of the GNU GPL license * ! * Template: Query/LockRequired/thisDatabaseName.cfm * * Purpose: Creates a Record Set with the name of the current database * ! * Requiremets: - Connection Variables must already be set * ! * - This Query Must be called from within a session lock to ensure the * ! * integrity of session variables * ********************************************************************************************---> <!---||| Create a Record Set with the name of the current database |||---> ! <cfquery name="thisDatabaseName" datasource="#session.dataSource#" username="#session.userName#" password="#session.password#"> SELECT DATABASE() AS databaseName; </cfquery> --- 1,22 ---- <!---******************************************************************************************* * Copyright: MyDatabase Pilot is distributed under the terms of the GNU GPL license * ! * Template: Query/LockRequired/thisDatabaseName.cfm (CUSTOM TAG) * * Purpose: Creates a Record Set with the name of the current database * ! * 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 thisDatabaseName custom tag."></cfif> + <cfif NOT IsDefined("ATTRIBUTES.dataSource")><CFABORT showerror="The dataSource attribute is required when calling thisDatabaseName custom tag."></cfif> + <cfif NOT IsDefined("ATTRIBUTES.userName")><CFABORT showerror="The userName attribute is required when calling thisDatabaseName custom tag."></cfif> + <cfif NOT IsDefined("ATTRIBUTES.password")><CFABORT showerror="The password attribute is required when calling thisDatabaseName custom tag."></cfif> + <!---||| Create a Record Set with the name of the current database |||---> ! <cfquery name="CALLER.#ATTRIBUTES.queryName#" datasource="#ATTRIBUTES.dataSource#" username="#ATTRIBUTES.userName#" password="#ATTRIBUTES.password#"> SELECT DATABASE() AS databaseName; </cfquery> |