Ernie Pena wrote...
>> Is it possible to check to see if a table exists in a database (MS
Access or SQL) and return a controlled error?

One method...

<cfset isRealTable = true>
<cftry>
<cfquery name="testForTable" datasource="whatever">
SELECT * FROM tableYourLookingFor
</cfquery>

<cfcatch type="database">
<cfset isRealTable = false>
</cfcatch>
</cftry>

Although you probably want to try and limit your sql so that it retrives
only one row and not the whole table

--
dc

-----Original Message-----
From: Ernie Pena [mailto:[EMAIL PROTECTED]
Sent: 19 February 2004 13:57
To: CF-Talk
Subject: Database tbl Check

Is it possible to check to see if a table exists in a database (MS
Access or SQL) and return a controled error?
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to