Toggle menu

tableExists

tableExists(ctx, tablename)

Tests whether a data import table already exists.

Parameters

NameTypeDescription
ctxStruct, requiredDatabase details, see above
tablenameString, requiredThe 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

Share this page

Facebook icon Twitter icon email icon

Print

print icon