PLEASE HELP ME IN "Microsoft VBScript compilation (0x800A0400)Expected statement" (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


kinyee -> PLEASE HELP ME IN "Microsoft VBScript compilation (0x800A0400)Expected statement" (4/6/2008 21:01:33)

THIS IS MY ERROR TYPE
Microsoft VBScript compilation (0x800A0400)
Expected statement
/order/updatemonthly.asp, line 68
" values (" & Request.Form("date") &" ," & _

AND THIS IS MY STATEMENT
<%


set rs = conntemp.Execute("SELECT * FROM MonthlyReport")





Progress_date = request.form("date")

Math = request.form("math")

BM = request.form("bm")

English = request.form("eng")

Physical_education = request.form("physical")

Child_id = request.form("cid")

Staff_id = request.form("sid")



conntemp.Execute '"Insert into MonthlyReport (Progress_date,Math,BM,English,Physical_education,Child_id,Staff_id)"' & _
" values ('" & Request.Form("date") &"' ," & _
" '" & Request.Form("math") & "'," & _
" '" & Request.Form("bm") &" '," &_
" '" & Request.Form("eng") &"'," &_
" '" & Request.Form("physical") & "'," &_
" '" & Request.Form("cid") & "'," &_ " '" & Request.Form("sid") & "')"







%>

I DUN KNOW WHAT IS HAPPEN TO THE STATEMENT...PLEASE HELP!!THANK YOU.[:)]




Spooky -> RE: PLEASE HELP ME IN "Microsoft VBScript compilation (0x800A0400)Expected statement" (4/6/2008 21:08:54)

At the end of the previous line, you have an apostrophe that shouldnt be there?

conntemp.Execute '"Insert into MonthlyReport (Progress_date,Math,BM,English,Physical_education,Child_id,Staff_id)"' <--




kinyee -> RE: PLEASE HELP ME IN "Microsoft VBScript compilation (0x800A0400)Expected statement" (4/6/2008 21:15:32)

thanks for remind but i still cannot solve my problem which is

" values ('" & Request.Form("date") &"' ," & _




Spooky -> RE: PLEASE HELP ME IN "Microsoft VBScript compilation (0x800A0400)Expected statement" (4/6/2008 23:42:02)

Are you still getting the same error after removing that apostrophe ?




kinyee -> RE: PLEASE HELP ME IN "Microsoft VBScript compilation (0x800A0400)Expected statement" (4/6/2008 23:46:45)

yaya..i still get the same problem as 1st i get




Spooky -> RE: PLEASE HELP ME IN "Microsoft VBScript compilation (0x800A0400)Expected statement" (4/7/2008 1:15:13)

Also one at the front : conntemp.Execute '"I




kinyee -> RE: PLEASE HELP ME IN "Microsoft VBScript compilation (0x800A0400)Expected statement" (4/7/2008 9:28:12)

If I move out the '
it will show this statement

Error Type:
Microsoft JET Database Engine (0x80040E14)
Syntax error in INSERT INTO statement.
/kindergarten/updatemonthly.asp, line 57







Spooky -> RE: PLEASE HELP ME IN "Microsoft VBScript compilation (0x800A0400)Expected statement" (4/7/2008 15:09:44)

If you do it this way, what does the SQL string say when you view the web page?
sSQL = "Insert into MonthlyReport (Progress_date,Math,BM,English,Physical_education,Child_id,Staff_id)" & _
" values ('" & Request.Form("date") &"' ," & _
" '" & Request.Form("math") & "'," & _
" '" & Request.Form("bm") &" '," &_
" '" & Request.Form("eng") &"'," &_
" '" & Request.Form("physical") & "'," &_
" '" & Request.Form("cid") & "'," &_ 
" '" & Request.Form("sid") & "')"

response.write sSQL
response.end

conntemp.Execute (sSQL)






Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.109375