Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2004
    Posts
    53

    Unhappy Unanswered: plz check my coding

    i have a big..big problem..HOW TO DELETE AN AUTO NUMBER....

    this is my coding

    sq2= "DELETE * FROM tb_aduan WHERE id_aduan = ' "& aduan & " ' "
    set rs =db.execute(sq2)

  2. #2
    Join Date
    Mar 2003
    Location
    Atlanta, GA
    Posts
    191
    I assume id_aduan is the autonumber field? If so, you should not be using the quotes around the value. You also don't need the * in the statement. Try this: (assumming you have set aduan equal to a numerical value rather than a string value.)

    sq2= "DELETE FROM tb_aduan WHERE id_aduan=" & aduan
    set rs =db.execute(sq2)

    Tim
    Tim

  3. #3
    Join Date
    Jul 2003
    Location
    SoCal
    Posts
    721
    You had this issue in one of your prior posts.. you should read the responses that people have posted:

    http://www.dbforums.com/t997627.html
    That which does not kill me postpones the inevitable.

  4. #4
    Join Date
    Dec 2003
    Posts
    454
    Holly book (SQL Server Books Online) will give you a lot of help. The syntax of the deletion of the row you wrote is not correct. The basic syntax is

    DELETE [FROM] tableName WHERE ...

  5. #5
    Join Date
    Mar 2004
    Posts
    53

    Talking settle...

    ok tq every one...i have settle m problem..i change the id_aduan into number..so my system work smothly...tq

Posting Permissions

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