I'm not sure of the Access syntax but I would have thought you wanted 

IF NOT EXISTS(SELECT * FROM MSysObjects 
                  WHERE ParentID = (SELECT Id FROM MSysObjects WHERE Name =
'productID') 
                  AND Name = '#CFTOKEN#')

CREATE TABLE Here!!

END IF

Do INSERT here



-----Original Message-----
From: Jon Tillman [mailto:[EMAIL PROTECTED]]
Sent: 24 August 2000 11:44
To: [EMAIL PROTECTED]
Subject: RE: checking for tables?


On Thu, 24 Aug 2000, Andy Ewings spake thusly:
> What you want to do is test to see if the table is there.  If it is Insert
> data into it, if not create it first and then insert into it right?  What
> Nick has done is to provide you with the first line of code you need.  If
> the test succeeds then you want to only perform an Insert, if it fails
(i.e.
> the ELSE part) then you want to do a create.  Even better I'd do nothing
if
> it does succeed and a create if the test fails and then perform an insert
> whatever.  This make sense?
> 
Along the lines of:

        IF EXISTS(  SELECT *
                    FROM    MSysObjects
                    WHERE   ParentID = (   SELECT   Id
                                           FROM     MSysObjects
                                           WHERE    Name = 'productID')
                                           AND Name = '#CFTOKEN#')
        ELSE(   CREATE TABLE #CFTOKEN# (
                    productID number,
                    productQty number);)

Maybe?
-- 
***********************************************
 Jon Tillman
 LINUX USER: #141163
 ICQ: 4015362
 http://www.eruditum.org
 [EMAIL PROTECTED]
***********************************************
Help Jon build a network!
Looking for giveaway computers & parts
Current Need: Tape Drive & PI/PII processors
Email me to find out how you can help
***********************************************

----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
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.mail-archive.com/cf-talk@houseoffusion.com/
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.

Reply via email to