Set Conn=Server.CreateObject("ADODB.Connection")
Conn.Provider = "Microsoft.Jet.OLEDB.4.0"
Conn.Open Server.MapPath("\project\db\guestbook\guestbook.mdb")
Sql="SELECT * FROM guestbook WHERE NAME= ' "&Name&" ' AND NOTE= ' "&Note&" ' ORDER BY ID DESC"
Set rs=Server.CreateObject("ADODB.Recordset")
rs.Open Sql,Conn,1,3
If rs.RecordCount = 0 Then status = 1
If status = 1 Then
Sql="SELECT * FROM guestbook ORDER BY ID DESC"
Set rs=Server.CreateObject("ADODB.Recordset")
rs.Open Sql,Conn,1,3
If rs.Recordcount = 0 Then
id = 0
Else
id = rs("ID")
End if
rs.AddNew
rs("ID") = id+1
rs("NAME")=Name
rs("NOTE")=Note
rs("PICTURE")=Picture
rs("DATE")=Date_
rs("IP") = IP
If Email <>"" Then
rs("EMAIL")=Email
Else
rs("EMAIL")="none"
End if
rs.Update
%>
พอรันมันขึ้น error ว่า
Error Type:
Microsoft JET Database Engine (0x80040E09)
Cannot update. Database or object is read-only.
/project/guestbook/result_newquestion.asp, line 39