|
-
Jun 7th, 2001, 06:45 AM
#1
Thread Starter
New Member
Can't get around error message.
Dear Folks,
I have been running the exact ASP code on three machines; one with Windows NT and the other two with Windows 98/ME. All have MS Personnal Web Server installed.
The main part of the code, which opens a database connection and then using this opens a recordset object, is as follows:
<!-- METADATA TYPE="typelib"
FILE="c:\Program Files\Common Files\System\ado\msado15.dll" -->
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data Source= C:\Inetpub\wwwroot\class\ch15\classified_2000.mdb"
Dim rsUsers
Set rsUsers = Server.CreateObject("ADODB.Recordset")
rsUsers.Open "Person", objConn, adOpenForwardOnly, adLockOptimistic, adCmdTable
If Session("PersonID") <> "" Then ' currently logged-on user
rsUsers.Filter = "PersonID = '" & Session("PersonID") & "'"
Else ' New session
rsUsers.Filter = "EMailAddress = '" & Request.Form("email") & "'" & _
"AND Password = '" & Request.Form("password") & "'"
If rsUsers.EOF Then ' User not found
rsUsers.AddNew ' ...so add a new record
Now what happens is that on the Win 98/ME machines everything works fine... a new record is added as required and the next page comes up. However, with the NT one, the following error message comes up in the IE browser:
Error: 80040e09
Can not update. Database or object is read only.
And it points to the line 'rsUsers.Addnew' as the cause.
I don't know why this is happening. Could it be related to the version of ADO/DAC on the machine or maybe the version of the msado15.dll file? or something else?
CAN ANYONE HELP?!
Asif.
-
Jun 7th, 2001, 12:12 PM
#2
Frenzied Member
You are opening the recordset as read only.
change this:
rsUsers.Open "Person", objConn, adOpenForwardOnly, adLockOptimistic, adCmdTable
to this:
rsUsers.Open "Person", objConn, adOpenKeyset, adLockOptimistic, adCmdTable
oOOo--oOOo
__ /\/\onte96
oOOo--oOOo
Senior Programmer/Analyst
MCP
[email protected]
[email protected]
Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..
-
Jun 8th, 2001, 09:47 AM
#3
Thread Starter
New Member
Still not working....
Hi monte96......
It didn't work!
What else could it be?
asif.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|