Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Nov 15th, 2005, 8:17 PM   #1
raikkonen
Newbie
 
Join Date: Jun 2005
Posts: 29
Rep Power: 0 raikkonen is on a distinguished road
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>"]
raikkonen is offline   Reply With Quote
Old Nov 16th, 2005, 6:00 AM   #2
java_roshan
Professional Programmer
 
Join Date: Mar 2005
Location: Student of University of Mumbai, Maharashtra State, India
Posts: 344
Rep Power: 4 java_roshan is on a distinguished road
Looking at the error (referencing with Visual Basic) I think, you might have specified a different datatype in the database and passing a different datatype value in the query...
Its just that I am referring to Visual Basic kind of error...

I am not really sure about this error in ASP...
__________________
Visit: http://www.somaiya.edu
java_roshan is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 12:35 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC