Results 1 to 5 of 5

Thread: deleting records

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2000
    Location
    Mexico
    Posts
    16

    Exclamation

    How can I delete all the recors I have in one table.

  2. #2
    Frenzied Member
    Join Date
    Aug 1999
    Location
    Santa Clara, Ca , 95058
    Posts
    1,105
    In SQL you can

    1) delete from table [don't qualify the delete with a where condition]

    2) drop the table and add it back again

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Mar 2000
    Location
    Mexico
    Posts
    16

    Unhappy

    Could you be more specific Im new at VB programing.

    Thanks......

  4. #4
    Fanatic Member
    Join Date
    Oct 2000
    Location
    London
    Posts
    1,008
    DELETE * FROM TableName

    or

    DROP TABLE TableName

    followed by

    CREATE TABLE TableName (field1 type [(size)] [NOT NULL] [index1] [, field2 type [(size)] [NOT NULL] [index2] [, ...]] [, CONSTRAINT multifieldindex [, ...]])

    You can see that the first one is easier!

    Cheers,

    Paul
    Not nearly so tired now...

    Haven't been around much so be gentle...

  5. #5
    Hyperactive Member
    Join Date
    Oct 2000
    Posts
    400
    The SQL way is much better than this, but this way will work:

    rst.MoveFirst
    Do Until rst.EOF
    rst.Delete
    rst.MoveNext
    Loop


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