[Mydatabasepilot-cvs] MyDatabasePilot/Query fieldList.cfm,1.1,1.2
Status: Alpha
Brought to you by:
nanoface
From: <nan...@us...> - 2003-05-15 03:47:59
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/Query In directory sc8-pr-cvs1:/tmp/cvs-serv32435/Query Modified Files: fieldList.cfm Log Message: Internal Structure Changed: [ 738029 ] Convert Query/fieldList.cfm to a CUSTOM TAG Index: fieldList.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/Query/fieldList.cfm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** fieldList.cfm 13 Apr 2003 05:47:26 -0000 1.1 --- fieldList.cfm 15 May 2003 03:47:56 -0000 1.2 *************** *** 1,17 **** <!---******************************************************************************************* * Copyright: MyDatabase Pilot is distributed under the terms of the GNU GPL license * ! * Template: Query/fieldList.cfm * ! * Purpose: Creates a Record Set with a list of fields and their properties * ! * in the current database * ! * Requiremets: - Connection Variables must already be set * ! * - Table name must have been passed to current template as a URL Variable * ********************************************************************************************---> ! <!---||| Find out the list of Fields and their properties in the Current Table |||---> ! <!--- Initiate a Read Only lock to ensure the integrity of session variables ---> ! <cflock timeout=20 throwontimeout="no" type="readonly" scope="session"> ! <!--- Create Recordset with a List of field names and their properties ---> ! <cfquery name="fieldList" datasource="#session.dataSource#" username="#session.userName#" password="#session.password#"> ! SHOW FIELDS FROM #url.table#; ! </cfquery> ! </cflock> \ No newline at end of file --- 1,26 ---- <!---******************************************************************************************* * Copyright: MyDatabase Pilot is distributed under the terms of the GNU GPL license * ! * Template: Query/fieldList.cfm (CUSTOM TAG) * ! * Purpose: Creates a Record Set with a list of fields and their properties for the * ! * requested table * ! * Inputs: - queryName (Required) * ! * - dataSource (Required) * ! * - userName (Required) * ! * - password (Required) * ! * - table (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 fieldList custom tag."></cfif> ! <cfif NOT IsDefined("ATTRIBUTES.dataSource")><CFABORT showerror="The dataSource attribute is required when calling fieldList custom tag."></cfif> ! <cfif NOT IsDefined("ATTRIBUTES.userName")><CFABORT showerror="The userName attribute is required when calling fieldList custom tag."></cfif> ! <cfif NOT IsDefined("ATTRIBUTES.password")><CFABORT showerror="The password attribute is required when calling fieldList custom tag."></cfif> ! <cfif NOT IsDefined("ATTRIBUTES.table")><CFABORT showerror="The table attribute is required when calling fieldList custom tag."></cfif> ! ! <!---||| Find out the list of Fields and their properties in the Passed Table |||---> ! <!--- Create Recordset with a List of Field Names and Their Properties ---> ! <cfquery name="CALLER.#ATTRIBUTES.queryName#" datasource="#ATTRIBUTES.dataSource#" username="#ATTRIBUTES.userName#" password="#ATTRIBUTES.password#"> ! SHOW FIELDS FROM #ATTRIBUTES.table#; ! </cfquery> \ No newline at end of file |