If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > plz check my coding

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-17-04, 23:23
fisya fisya is offline
Registered User
 
Join Date: Mar 2004
Posts: 53
Unhappy 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)
Reply With Quote
  #2 (permalink)  
Old 05-18-04, 01:11
MrWizard MrWizard is offline
Registered User
 
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
Reply With Quote
  #3 (permalink)  
Old 05-18-04, 11:09
Seppuku Seppuku is offline
Useless...
 
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.
Reply With Quote
  #4 (permalink)  
Old 05-18-04, 11:58
gyuan gyuan is offline
Registered User
 
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 ...
Reply With Quote
  #5 (permalink)  
Old 05-19-04, 00:39
fisya fisya is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On