Microsoft OLE DB Provider for ODBC Drivers error '80040e07' [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression. /db.asp, line 32
Code (VB.NET) <body background="http://www.ec-mall.com/wp-content/uploads/gallery/user_3393_clarity_6.jpg"> <a href="?m=1">»é͹¢éÍÁÙÅ</a> <a href="?m=2">áÊ´§¢éÍÁÙÅ</a> <a href="?m=3">ź¢éÍÁÙÅ</a> <% Set DB1=Server.CreateObject("ADODB.Connection") DB1.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("dbweb.mdb") select case request("m") case "1" : insert() case "2" : show() case "3" : delete() end select DB1.close '============================================================== sub insert() %> <form> ÃËÑÊ<input type="text" name="id"><br> ª×èÍ<input type="text" name="name"><br> àºÍÃìâ·Ã<input type="text" name="tel"><br> ·ÕèÍÂÙè<input type="text" name="add"><br> à¡Ã´à©ÅÕèÂ<input type="text" name="gpax"><br> <input type="submit" value="à¾ÔèÁ¢éÍÁÙÅ"><hr> <input type="hidden" name="m" value="1"> </form> <% if request("id")<>"" then a="insert into std values('"&request("id")&"','"&request("name")&"','"&request("tel")&"','"&request("add")&"','"&request("gpax")&"')" set b=DB1.execute(a) end if show() end sub '============================================================== sub show() if request("del")<>"" then y="delete from std where std_id='"&request("del")&"'" set b=DB1.execute(y) end if a="select * from std order by std_id" set b=DB1.execute(a) do while not b.eof %> <br> <%=b("std_id")%> <a href='?m=2&del=<%=b("std_id")%>'>[ź]</a> <% b.movenext loop b.close %> <% end sub '================================================================== sub delete() %><br> <form> ÃËÑÊ<input type="text" name="did"><br> <input type="submit" value="ź¢éÍÁÙÅ"><hr> <input type="hidden" name="m" value="3"> </form> <% if request("did")<>"" then a="delete from std where std_id ='"&request("did")&"'" set b=DB1.execute(a) end if show() end sub '================================================================== %> </body>
<body background="http://www.ec-mall.com/wp-content/uploads/gallery/user_3393_clarity_6.jpg"> <a href="?m=1">»é͹¢éÍÁÙÅ</a> <a href="?m=2">áÊ´§¢éÍÁÙÅ</a> <a href="?m=3">ź¢éÍÁÙÅ</a> <% Set DB1=Server.CreateObject("ADODB.Connection") DB1.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("dbweb.mdb") select case request("m") case "1" : insert() case "2" : show() case "3" : delete() end select DB1.close '============================================================== sub insert() %> <form> ÃËÑÊ<input type="text" name="id"><br> ª×èÍ<input type="text" name="name"><br> àºÍÃìâ·Ã<input type="text" name="tel"><br> ·ÕèÍÂÙè<input type="text" name="add"><br> à¡Ã´à©ÅÕèÂ<input type="text" name="gpax"><br> <input type="submit" value="à¾ÔèÁ¢éÍÁÙÅ"><hr> <input type="hidden" name="m" value="1"> </form> <% if request("id")<>"" then a="insert into std values('"&request("id")&"','"&request("name")&"','"&request("tel")&"','"&request("add")&"','"&request("gpax")&"')" set b=DB1.execute(a) end if show() end sub '============================================================== sub show() if request("del")<>"" then y="delete from std where std_id='"&request("del")&"'" set b=DB1.execute(y) end if a="select * from std order by std_id" set b=DB1.execute(a) do while not b.eof %> <br> <%=b("std_id")%> <a href='?m=2&del=<%=b("std_id")%>'>[ź]</a> <% b.movenext loop b.close %> <% end sub '================================================================== sub delete() %><br> <form> ÃËÑÊ<input type="text" name="did"><br> <input type="submit" value="ź¢éÍÁÙÅ"><hr> <input type="hidden" name="m" value="3"> </form> <% if request("did")<>"" then a="delete from std where std_id ='"&request("did")&"'" set b=DB1.execute(a) end if show() end sub '================================================================== %> </body>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง