Run your drop table query the table within a <cftry>.

That'll catch any errors that would be thrown due to the table not
existing.

> -----Original Message-----
> From: Terry Troxel [mailto:[EMAIL PROTECTED]
> Sent: Sunday, March 28, 2004 9:48 AM
> To: CF-Talk
> Subject: Does table exist?
>
>
> I am looking for a way to determine if a table exists so I
> can then decide what action to take.
>
> I have been unable to find away to do this with an Access
> Macro, so now am trying to achieve the same results within CF.
>
> I run a macro within Access that Deletes a table and then
> runs a Make Table Query. My problem is if I have a problem
> the table gets deleted and the next time the macro runs and
> errors out as it has no table to delete. If I knew up front
> whether the table exists I wouldn't try and delete it, just
> create the new one,
>
> If I could do this within Access it would be easier.
> If I could do this from CF I could achieve the same results as well.
>
> Sure would appreciate some suggestions here.
>
> BTW The reason for all this is MAS90's Providex driver will
> not allow me to access their tables in either a linked table
> in Access or directly via ODBC. Do I create a link in Access
> and on a schedule I run a batch file that opens Access from
> the command line and runs the macro that deletes, and then
> does a make table from the linked table. Then it compresses
> the database to help keep the database size manageable.
>
> This works flawlessly 98 per cent of the time for the past
> year or so. I want to cover my butt for the remaining 2 per cent.
>
> Terry Troxel
>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to