Use CFCATCH, and catch any database error.  If one comes up you know you need to drop 
the table and recreate it.  (using a conditional statement, of course)

---mark

--------------------------------------------------------------
Mark Warrick
Phone: (714) 547-5386
Efax.com Fax: (801) 730-7289
Personal Email: [EMAIL PROTECTED]
Personal URL: http://www.warrick.net 
Business Email: [EMAIL PROTECTED]
Business URL: http://www.fusioneers.com
ICQ: 346566
--------------------------------------------------------------


> -----Original Message-----
> From: S.E.Fling [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 27, 2000 2:40 PM
> To: [EMAIL PROTECTED]
> Subject: testing for existence of table
> 
> 
> Hi all,
> 
> I have a temporary table that needs to be deleted after 
> processing has completed. But, if the user bails and doesn't 
> complete the transaction, the temporary table doesn't get deleted,
> which causes an error message when CF attempts to create the 
> table later on. So I put in some code to delete the table before 
> it's created, but if it doesn't exist, I get an error
> message. I tried to test for the existence of the table, but I 
> guess this isn't the way to do it:
> 
>   <cfif #IsDefined(EDGE.dbo.Temp)#>
>       <CFQUERY DATASOURCE="EDGE" DBTYPE="ODBC">
>            DROP TABLE temp
>       </CFQUERY>
>  </cfif>
> 
> Please help!  TIA for any clues, tips, or answers.
> 
> sharon
> 
> ------------------------------------------------------------------
> ------------
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit 
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf
> _talk or send a message to [EMAIL PROTECTED] with 
> 'unsubscribe' in the body.

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebarRsts&bodyRsts/cf_talk or send a message 
to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to