Results 1 to 3 of 3

Thread: Drop tables if exists

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    1,370

    Drop tables if exists

    How to drop tables using SQL ? I use ADODB connection for microsoft access. My tables name is "Newtables" I want delete this tables if this tables exist in the database.

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Drop tables if exists

    Could you please not double post?

    I've already answered you here
    http://www.vbforums.com/showthread.php?t=525012

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Drop tables if exists

    I just noticed that you're using MS Access. This kind of information is useful to give out when asking a question. Please remember that there are no psychic programmers.

    In MS Access, to drop a table if it exists, you'd probably want to call the DROP TABLE statement directly and handle an error. An error would mean that it didn't exist but if it does exist, it'll get dropped.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width