tableExists(ctx, tablename)
Tests whether a data import table already exists.
Parameters
Name | Type | Description |
---|---|---|
ctx | Struct, required | Database details, see above |
tablename | String, required | The name of the table to test for |
Returns
Boolean. True if the table exists.
Example
<cfset ds=APPLICATION.datasource>
<cfset dt=APPLICATION.databasetype>
<cfset tablename="timstable">
<!--- get a data importer --->
<cfmodule template="/icm/admin/dataimport/importer_v1.cfm" name="di" datasource=#ds# databasetype=#dt#>
<!--- see if the table exists --->
<cfset tableexists = di.tableExists(ctx=#di#, tablename=#tablename#)>
<cfoutput>Done. Result:[#tableexists#]</cfoutput><cfflush>
Last modified on 30 September 2022