Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Cannot update. Database or object is read-only.
/RegisterUser1.asp, line 9
I keep getting this error when I am trying to update my access database user information.
I have a basic form.html page that accepts users information and does a post to this page.
my database is just a baisc access 2000 database that has a tblUsers table in it.
Thanks!
Missippi
__________________________________________________________
<%@ Language=VBScript %>
<% Option Explicit %>
<!--#include virtual="/adovbs.inc"-->
<!--#include file="DatabaseConnect.asp"-->
<HTML>
<BODY>
<%
Dim objRS, bolAlreadyExists
If ((Request.Form("username"
= ""
OR (Request.Form("password"
= ""
_
OR (Request.Form("email"
= ""
OR (Request.Form("firstname"
= ""
_
OR (Request.Form("lastname"
= ""
) Then
Response.Write "<A HREF='register.html'>"
Response.Write "You must enter values for all the fields."
Response.Write "</A>"
Else
BolAlreadyExists = False
Set objRS = Server.CreateObject("ADODB.Recordset"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
objRS.Open "tblUsers", objConn, , adLockOptimistic, adCmdTable
Do While Not (objRS.EOF OR bolAlreadyExists)
If (StrComp(objRS("Username"
, Request.Form("username"
, _
vbTextCompare) = 0) Then
Response.Write "<A HREF='register.html'>"
Response.Write "Username already exists."
Response.Write "</A>"
bolAlreadyExists = True
End If
If (StrComp(objRS("Email"
, Request.Form("email"
, _
vbTextCompare) = 0) Then
Response.Write "<A HREF='register.html'>"
Response.Write "Email address already found in table."
Response.Write "</A>"
bolAlreadyExists = True
End If
objRS.MoveNext
Loop
If Not bolAlreadyExists Then
objRS.AddNew
objRS("FirstName"
= Request.Form("firstname"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
objRS("LastName"
= Request.Form("lastname"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
objRS("Email"
= Request.Form("email"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
objRS("Username"
= Request.Form("username"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
objRS("Password"
= Request.Form("password"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
objRS.Update
Response.Write "Thank you for registering."
End If
objRS.Close
Set objRS = Nothing
End If
%>
<!--#include file="DatabaseDisconnect.asp"-->
</BODY>
</HTML>
_______________________________________________________
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Cannot update. Database or object is read-only.
/RegisterUser1.asp, line 9
I keep getting this error when I am trying to update my access database user information.
I have a basic form.html page that accepts users information and does a post to this page.
my database is just a baisc access 2000 database that has a tblUsers table in it.
Thanks!
Missippi
__________________________________________________________
<%@ Language=VBScript %>
<% Option Explicit %>
<!--#include virtual="/adovbs.inc"-->
<!--#include file="DatabaseConnect.asp"-->
<HTML>
<BODY>
<%
Dim objRS, bolAlreadyExists
If ((Request.Form("username"
OR (Request.Form("email"
OR (Request.Form("lastname"
Response.Write "<A HREF='register.html'>"
Response.Write "You must enter values for all the fields."
Response.Write "</A>"
Else
BolAlreadyExists = False
Set objRS = Server.CreateObject("ADODB.Recordset"
objRS.Open "tblUsers", objConn, , adLockOptimistic, adCmdTable
Do While Not (objRS.EOF OR bolAlreadyExists)
If (StrComp(objRS("Username"
vbTextCompare) = 0) Then
Response.Write "<A HREF='register.html'>"
Response.Write "Username already exists."
Response.Write "</A>"
bolAlreadyExists = True
End If
If (StrComp(objRS("Email"
vbTextCompare) = 0) Then
Response.Write "<A HREF='register.html'>"
Response.Write "Email address already found in table."
Response.Write "</A>"
bolAlreadyExists = True
End If
objRS.MoveNext
Loop
If Not bolAlreadyExists Then
objRS.AddNew
objRS("FirstName"
objRS("LastName"
objRS("Email"
objRS("Username"
objRS("Password"
objRS.Update
Response.Write "Thank you for registering."
End If
objRS.Close
Set objRS = Nothing
End If
%>
<!--#include file="DatabaseDisconnect.asp"-->
</BODY>
</HTML>
_______________________________________________________