none
delete table

    Question

  • How do I simply delete a table I have created?  I have tried everything I know of and the command window always returns an error?  Here is what I have tried so far and I always get "No database is open or set as the current database" or "radcases is not a database" or "database radcases is not open", etc.:

     

    create table radcases;

    (co c(3),;

    deptno c(6),;

    cases n(12,0),;

    quantity n(12,0))

     

     

    DELETE TABLE RADCASES

    REMOVE TABLE RADCASES DELETE

    REMOVE TABLE RADCASES

    SELECT RADCASES

    REMOVE TABLE RADCASES DELETE

    USE RADCASES

    REMOVE TABLE RADCASES DELETE

    OPEN RADCASES

    REMOVE TABLE RADCASES DELETE

    OPEN DATABASE RADCASES

    REMOVE TABLE RADCASES DELETE

    remove table "C:\program files\Microsoft Visual Foxpro 9\radcases.dbf delete

    remove table "C:\program files\Microsoft Visual Foxpro 9\radcases.dbf" delete

    USE "c:\program files\microsoft visual foxpro 9\radcases.dbf" IN 0 SHARED

    remove table "C:\program files\Microsoft Visual Foxpro 9\radcases.dbf" delete

    remove table radcases delete

    SET DATABASE TO radcases

    USE "c:\program files\microsoft visual foxpro 9\radcases.dbf" IN 0 SHARED

    SET DATABASE TO radcases

    open database "c:\program files\microsoft visual foxpro 9\radcases.dbf" IN 0 SHARED

    open database "c:\program files\microsoft visual foxpro 9\radcases.dbf"

    remove table radcases delete

    remove table "C:\program files\Microsoft Visual Foxpro 9\radcases.dbf" delete

    SET DATABASE TO radcases

    remove table radcases delete

    remove table "C:\program files\Microsoft Visual Foxpro 9\radcases.dbf" delete

    Wednesday, November 7, 2007 5:16 PM

Answers

  • If it's a free table (not part of a database) then you would simply use

     

    USE in alias('MyTableName')

    DELETE FILE myTableName.DBF  (or ERASE myTableName.*)

     

    If it's part of a database, you need to use REMOVE TABLE first.

     

    Wednesday, November 7, 2007 5:24 PM
    Moderator

  • use the tbale exclusively
    and then do this
    drop table [tablename]



    example:
    say i have a table named clients

    use clients exclusively
    drop table clients
    Wednesday, November 7, 2007 5:39 PM

All replies

  • If it's a free table (not part of a database) then you would simply use

     

    USE in alias('MyTableName')

    DELETE FILE myTableName.DBF  (or ERASE myTableName.*)

     

    If it's part of a database, you need to use REMOVE TABLE first.

     

    Wednesday, November 7, 2007 5:24 PM
    Moderator

  • use the tbale exclusively
    and then do this
    drop table [tablename]



    example:
    say i have a table named clients

    use clients exclusively
    drop table clients
    Wednesday, November 7, 2007 5:39 PM
  • Thank you!!!

     

    Thursday, November 8, 2007 1:36 PM