![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Newbie
Join Date: Jun 2005
Posts: 29
Rep Power: 0
![]() |
Type Mismatch - Deleting Records
hi all, i' mtrying to delete some records using a form by checking the 'delete' box then click update. when i click on update,it's supposed to show me the same page,but without hte deleted records. but i've got a big problem.
show.asp is where i display all the data frm the database,including the 'delete' checbox. update.asp is where i do the deleting codes and then redirect it to show.asp. i suppose somethign is wrong in the SQL statement? please check for me!! i'm LOST !! the error given is written right at the end of hte post. THANKS!! here's my show.asp <form method="post" action="update.asp"> do while not rs.eof <input type="checkbox" value="<%rs=("WholeCakesCode")%>" name="Delete"> rs.movenext loop <input type="submit" value="update"> rs.close conn.close </form> here's my update.asp - i've made some changes to it: ....... (connection codes) For i=1 to Request.Form("delete") if request.form("delete")(i) <> "" then sql = "delete from wholecakes whre wholecakescode = " & request("Delete")(i) rs.open sql, conn end if next response.write(Sql) what went wrong? it gave me the error now: Type Mismatch: [string: "<the code that i attempted to delete>"] |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|