Error on update of recordset (1 Viewer)

JohnPapa

Registered User.
Local time
Today, 19:40
Joined
Aug 15, 2010
Messages
954
All of a sudden (and after a Windows update) I get the following error when I try to Update.
Otherwise the program works fine.
I use Access 365 and SQl Express

1702578369282.png

The Windows update info is
1702578606238.png


Will try to uninstall Windows update.

BTW, I deleted the table tblSerial and recreated it.
 

Ranman256

Well-known member
Local time
Today, 12:40
Joined
Apr 9, 2015
Messages
4,337
if the odbc is working
if the recordset is dynaset
then:

Code:
with rstSerial
  .edit
  .strL = "02"
  .update
end with
 

JohnPapa

Registered User.
Local time
Today, 19:40
Joined
Aug 15, 2010
Messages
954
I removed the Windows update and it works fine.

I will try to reinstall the Windows update and see if it was a transient problem.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 11:40
Joined
Feb 28, 2001
Messages
27,191
I'm with Ranman256... you are supposed to tell the recordset you want to edit it first with .Edit (or create a new record with .AddNew) before you would be allowed to update the record. I suppose there are exceptions - but I also see it as possible that the Windows Update corrected an erroneous behavior.
 

JohnPapa

Registered User.
Local time
Today, 19:40
Joined
Aug 15, 2010
Messages
954
I noted the comment on "Edit".

I just checked and it works with the Windows update. Maybe it was the restart that fixed the problem.
 

KitaYama

Well-known member
Local time
Tomorrow, 01:40
Joined
Jan 6, 2022
Messages
1,541
I'm with Ranman256... you are supposed to tell the recordset you want to edit it first with .Edit
Doc OP's recordset is ADODB not DAO.
To best of my knowledge ADODB recordset doesn't need .Edit nor has such a method.
But you need to set the cursor location to client to be able to update a record.
rs.CursorLocation = adUseClient
 
Last edited:

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 11:40
Joined
Feb 28, 2001
Messages
27,191
Whoopsie! Some times I notice things like that. Sometimes, not so much. Apologies for my confusion.
 

Users who are viewing this thread

Top Bottom