' Set file which can be upload
If Instr(filename_new,".jpg")<>0 Or Instr(filename_new,".gif")<>0 Or Instr(filename_new,".jpeg")<>0 Then
Set fs=Server.CreateObject("Scripting.FileSystemObject")
Set uploadfile=fs.CreateTextFile(Server.Mappath("picture"&"/"&filename_new))
uploadfile.Write uploaddata.Item("file").Item("value")
uploadfile.Close
set fs=Nothing
End If
sql ="select * from question"
set rs = server.CreateObject("ADODB.RECORDSET")
rs.open sql,connect,1,3
rs.AddNew
rs("q_name")=uploaddata.Item("name").Item("value")
rs("q_sex")=uploaddata.Item("mode").Item("value")
rs("q_date") = year(now)&"/"&month(now)&"/"&day(now)&" "&time
rs("q_ip") = request.ServerVariables("REMOTE_ADDR")
rs("q_topic")=uploaddata.Item("topic").Item("value")
rs("q_detail")=uploaddata.Item("message").Item("value")
rs("q_file")=uploaddata.Item("filename").Item("value")
bytecount=Request.TotalBytes
If bytecount<80000 Then ' set file to be less than 80 K
rs("q_pic")=uploaddata.Item("file").Item("value") -----เออเร่อร์บรรทัดนี้ค่ะ
rs.Update
rs.Close
Response.write("ºÑ¹·Ö¡àÃÕºÃéÍÂ")
End If%>
<%end if%>
<script>
window.location='showdetail.asp';
</script>
เออเร่อร์ว่า
Error Type:
Microsoft JET Database Engine (0x80040E21)
The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data.
/WebBoard/rest/questionSave.asp, line 45