HOME > ASP > ASP Forum > รันโค้ด aspthaiforum แล้วมันฟ้อง error น่ะคับ มันฟ้องแบบนี้อะคับ Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80004005) annot update. Database or object is read-only.
รันโค้ด aspthaiforum แล้วมันฟ้อง error น่ะคับ มันฟ้องแบบนี้อะคับ Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80004005) annot update. Database or object is read-only.
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Cannot update. Database or object is read-only.
/forum/common.asp, line 299
ส่วนอันนี้เป็นโค้ดบางส่วนของไฟล์ common.asp
strLoggedInUserCode = Trim(Mid(Request.Cookies("ASPThai")("UCODE"), 1, 44))
strLoggedInUserID = Trim(Mid(Request.Cookies("ASPThai")("UID"), 1, 44))
strLoggedInUserName = Trim(Mid(Request.Cookies("ASPThai")("UNAME"), 1, 44))
If strLoggedInUserCode <> "" Then
'Make the usercode SQL safe
strLoggedInUserCode = formatSQLInput(strLoggedInUserCode)
strSQLCookies="Select*From "&strDbTable&"Member "
strSQLCookies = strSQLCookies & "WHERE "&strDbTable&"Member.code = '" & strLoggedInUserCode & "';"
Set strRSCookies =Server.CreateObject("ADODB.Recordset")
strRSCookies.open strSQLCookies,Conn,1,3
If strRSCookies.RecordCount <> 0 then
strUserCount=strRSCookies("Count")
strRSCookies("Count")=strUserCount+1
strRSCookies.UpDate
strMemberID= strRSCookies("id")
strMemberUser= strRSCookies("name")
strMemberEmail= strRSCookies("email")
strMemberGroup= strRSCookies("group")
strMemberName_Group= strRSCookies("name_group")
strMemberIP= strRSCookies("IP")
If strMemberGroup <> 5 Then
Dim rsIPAddressCookies
Dim strCheckIPAddressCookies
Dim strUserIPAddressCookies
Dim blnIPMatchedCookies
If strIP_Ban_Block=True Then
strSQLIPAddressCookies = "SELECT* FROM "&strDbTable&"IP_Block"
Set rsIPAddrCookies = Server.CreateObject("ADODB.Recordset")
rsIPAddrCookies.Open strSQLIPAddressCookies, Conn,1,3
If rsIPAddrCookies.RecordCount <> 0 then
Do while NOT rsIPAddrCookies.EOF
strCheckIPAddressCookies = rsIPAddrCookies("ip_block")
If Right(strCheckIPAddressCookies, 1) = "*" Then
strCheckIPAddressCookies = Replace(strCheckIPAddressCookies, "*", "", 1, -1, 1)
strUserIPAddressCookies = Mid(strUserIPAddressCookies, 1, Len(strCheckIPAddressCookies))
If strCheckIPAddressCookies = strUserIPAddressCookies Then blnIPMatchedCookies = True
Else
If strCheckIPAddressCookies = strUserIPAddressCookies Then blnIPMatchedCookies = True
End If
rsIPAddrCookies.MoveNext
Loop
rsIPAddrCookies.Close
Set rsIPAddrCookies = Nothing
If blnIPMatchedCookies = True Then Response.Redirect "block_ip.asp"
End If
End If
Else
Session.Timeout=60
Session("MemberID")= strRSCookies("id")
Session("MemberUser")= strRSCookies("name")
Session("MemberEmail")= strRSCookies("email")
Session("MemberGroup")= strRSCookies("group")
Session("MemberName_Group")= strRSCookies("name_group")
Session("MemberIP")= strRSCookies("IP")
End If
End If
End If