SQL Add record problems
Users questions: Saying that "INSERTINTO statement syntax error" problems do not know how things would go, experts advise! % @ LANGUAGE = "VBSCRIPT" CODEPAGE = "936"%! ** # Includefile = "conn t.asp "**! DOCTYPEhtmlPUBLIC" -** W3C DTDXHTML1.0Transitional ** ** EN "" http: www.w3.org ** * * TR xhtml1 DTD * * J. tml1-transitional.dtd htmlxmlns= http:**www.w3.org*1999*xhtml head metahttp-equiv= Content-Type "Content =" text * html; charset = gb2312 "* title Untitled Document * title * head body center% ifTrim (Request.Form ( "Title "))="" orTrim (Request.Form (" content "))="" thenResponse.Write "Sorry, the title must be filled with content!" Response.Write "pa e ))typer=Trim(Request.Form( type ))content=Trim(Request.Form( content ))timea=date()dimstrsqlstrsql = insertintonotice(type,title,content,time)values( &typer& , &title& , &content& ,# &date()& # ) "Db.Execute (strsql) ifdb.errors.count 0thenResponse.Write" error occurred during save, go back to re-fill "Response.Write" p ahref = 'Addnotice_form.asp' return, re-fill out a "elseResponse.Write" p Notice added successfully * p "endifresponse.Redirect" addnotice_ form.asp "endif% * center * body * html
Experts answer:typetime may be reserved keywords can not use your system to change a field name, you can out of your strsqlresponse.write There is nothing wrong or look into the sql query or access devices in the run to see what there is no error