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
Set Conn=Server.Createobject("ADODB.Connection")
Conn.Open "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath("db1.mdb"),"" , ""
sql ="Select * From doc where code='"&uploaddata.Item("code").item("value")&"'"
Set RS =Server.CreateObject("ADODB.Recordset")
RS.open Sql,Conn,1,3
if NOT(RS.EOF) then
response.write("รหัสนี้มีแล้ว")
else
Rs.AddNew
Rs("code") = uploaddata.Item("code").item("value")
Rs("head") = uploaddata.Item("head").item("value")
Rs("detail") = uploaddata.Item("detail").item("value")
Rs("date1") = uploaddata.Item("date1").item("value")
rs("images")=filename_new <====== error บรรทัดนี้ครับ
Rs.Update
Conn.Close
response.write("บันทึกข้อมูลแล้ว")
end if
%>
</body>
</html>
พอรันจะขึ้น error ดังนี้ครับ
Error Type:
Provider (0x80040E21)
Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.