Results 1 to 2 of 2

Thread: Deleting Recordsets

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2001
    Location
    US
    Posts
    115

    Talking Deleting Recordsets

    How do I delete an entire set of records fitting
    a certain SQL criteria EX:

    Recordsource = "Select field_name From table_name Where field_name = some_value"

    I would like to delete all records that are returned from the above SQL statement

    Here is an example of the kind of database extracting code I'm using

    with adodc1
    .connectionstring = "Provider...."
    .cursorlocation =
    .cursorType =
    .commandtype = adcmdtext
    .recordsource = "Select field_name From table_name Where field_name = some_value"
    .refresh
    end with

    I am aware that the command is:
    adodc1.recordset.delete

    However I would like to be able to remove ALL records that are returned from the SQL statement

    I hope someone can help me with this

    thanks
    Panther

  2. #2
    Addicted Member Mandelbrot's Avatar
    Join Date
    Aug 2001
    Location
    Work, as usual!!
    Posts
    241
    Code:
    DELETE
        *
    FROM
        myTbl
    WHERE
        <criteria> [AND|OR]
        <criteria>
    ;

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