本文介绍了无法提交的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 亲爱的朋友们, 我在提交此表格时遇到问题......这是代码..... feedback.asp [HTML]<! - #include file =" include / connection.asp" - > <! - #include file =" css / main.css" - > <% name = request(" name") dob = request(" date") prim_despl = request(" prim_despl") sec_despl = request(" sec_despl") permanent_add = request(" permanent_add") 电话=请求(电话) fax = request(fax) email = request(" email" ) gender = request(gender) mrg_status = request(" mrg_status") nationality = request(nationalityquot ;) mother_lang = request(" mother_lang") other_lang = request(" other_lang") edu_qfn = request(") edu_qfn") training = request(training) comp_know = request(" comp_know") exp = request(" ; exp") emp_record = request(" emp_record") prof_exp = request(" prof_ex p") intl_exp = request(" intl_exp") country_wrk_exp = request(" country_wrk_exp") instl_member = request(" ; instl_member") book_papers = request(" book_papers") rel_info = request(" rel_info") check1 ="从反馈中选择电子邮件,其中email =''"&电子邮件&"''" set rs1 = Server.CreateObject(" Adodb.Recordset") rs1.Open check1,con,1,3 那么 query ="插入反馈(name,dob,prim_despl,sec_despl,permanent_add,电话,传真,电子邮件,性别,mrg_status,& vbcrlf _ &" nationality,mother_lang,other_lang,edu_qfn,traini ng,comp_know,exp,emp_record, prof_exp,intl_exp," _ &" country_wrk_exp,instl_member,book_papers)values(''"& name&"'',''"& dob& "'',''"& prim_despl&"'',''"& sec_despl&"''," _ &"'' & permanent_add&"'',''"& telephone&"'',''"& fax&"'',''"& email&" ;'',''"& gender&"'',''"&am p; mrg_status&"'''," _ &"''"& nationality&"'',''"& mother_lang&"'',''"& other_lang&"'',''"& edu_qfn&"'',''"&训练&"''," _ & " "&安培; comp_know&"'',''"& exp&"'',''"& emp_record&"'',''"& prof_exp&"'',''"& intl_exp&"''," &安培; _ & " "&安培; country_wrk_exp&"'',''"& instl_member&"'',''"& book_papers&"'')" set rs = Server.CreateObject(" Adodb.Recordset") rs.Open query ,con,1,3 Response.Redirect(" feedback_success.asp?action = done") else Response.Redirect(" feedback_success.asp?action = Exist") 结束如果 rs.close 设置rs =没有 rs1.close 设置rs1 =没有 % > [/ HTML] 请告诉我我在哪里犯错.............. 谢谢 迪帕克解决方案 我的第一条评论是您的查询非常长。我总是喜欢使用addNew短语而不是INSERT。这只是一个偏好的问题,但我认为它们更直接,更不会出错,当它发生时,你可以立即找出错误的位置。 我假设错误在行中: 展开 | 选择 | Wrap | 行号 Dear Frinds, I am facing problem while submitting this form......here is the code..... feedback.asp [HTML]<!-- #include file="include/connection.asp" --><!-- #include file="css/main.css" --><% name = request("name") dob = request("date")prim_despl = request("prim_despl")sec_despl = request("sec_despl")permanent_add = request("permanent_add")telephone = request("telephone")fax = request("fax")email = request("email")gender = request("gender")mrg_status = request("mrg_status")nationality = request("nationality")mother_lang = request("mother_lang")other_lang = request("other_lang")edu_qfn = request("edu_qfn")training = request("training")comp_know = request("comp_know")exp = request("exp")emp_record = request("emp_record")prof_exp = request("prof_exp")intl_exp = request("intl_exp")country_wrk_exp = request("country_wrk_exp")instl_member = request("instl_member")book_papers = request("book_papers")rel_info = request("rel_info") check1="select email from feedback where email=''"& email &"''"set rs1=Server.CreateObject("Adodb.Recordset")rs1.Open check1,con,1,3 if rs1.eof and rs1.bof then query="insert into feedback (name,dob,prim_despl,sec_despl,permanent_add,telep hone,fax,email,gender,mrg_status," & vbcrlf _ & "nationality,mother_lang,other_lang,edu_qfn,traini ng,comp_know,exp,emp_record,prof_exp,intl_exp," _& "country_wrk_exp,instl_member,book_papers)values('' "& name &"'', ''"& dob &"'', ''"& prim_despl &"'', ''"& sec_despl &"''," _& " ''"& permanent_add &"'', ''"& telephone &"'', ''"& fax &"'', ''"& email &"'', ''"& gender &"'', ''"& mrg_status &"''," _& " ''"& nationality &"'', ''"& mother_lang &"'', ''"& other_lang &"'', ''"& edu_qfn &"'', ''"& training &"''," _& " ''"& comp_know &"'', ''"& exp &"'', ''"& emp_record &"'', ''"& prof_exp &"'', ''"& intl_exp &"''," & _& " ''"& country_wrk_exp &"'', ''"& instl_member &"'', ''"& book_papers &"'')"" set rs=Server.CreateObject("Adodb.Recordset")rs.Open query,con,1,3 Response.Redirect ("feedback_success.asp?action=done") else Response.Redirect ("feedback_success.asp?action=Exist")end if rs.closeset rs = nothing rs1.closeset rs1 = nothing %>[/HTML] Please advice me where I am making a mistake.............. ThanksDeepak 解决方案 My first comment is your query is VERY long. I always prefer to use addNew phrases rather than INSERT. It is just a matter of preference, but I think they are more straight-forward, less can go wrong, and when it does, you can figure out where the error is immediately. I assume the error is in the line: Expand|Select|Wrap|Line Numbers 这篇关于无法提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
11-01 04:36