DWUTKA at marlow.com
DWUTKA at marlow.com
Tue Feb 3 20:16:14 CST 2004
Um, you'll need rs.Open sel_SQL, con, 1, 512 That 512 is Optimistic record locking. I think the default is 1, which is read-only. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Darren DICK Sent: Tuesday, February 03, 2004 7:10 PM To: AccessD List Subject: [AccessD] A2K: Can't update (ADO) Recordset Hello all Can anyone tell me why I get the following Error message when I try and update the following record set? ================================================= Error Number 3251 Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype ================================================= Code... Dim con As Object Dim rs As Object Dim sel_SQL As String Set con = Application.CurrentProject.Connection Set rs = CreateObject("ADODB.Recordset") sel_SQL = "SELECT tblMyTable.*, tblMyTable.FieldToBeUpdated FROM tblMyTable" _ & "WHERE (((tblMyTable.FieldToBeUpdated ) Is Not Null)); rs.Open sel_SQL, con, 1 '<====Error line is here somewhere me thinks With rs While Not .EOF !FieldToBeUpdated = -1 .MoveNext Wend End With _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com