[AccessD] A2K: Can't update (ADO) Recordset

Darren DICK d.dick at uws.edu.au
Tue Feb 3 20:44:16 CST 2004


Sigh
Still don't work
Now I get runtime error 3001
Arguments are of the wrong Type, are out of acceptable range,
or are in conflict with one another.
The the debug highlights the line...

rs.Open sel_SQL, con, 1, 512 

The field in the underlying table does exist. And is named correctly
I dunno

Darren


----- Original Message ----- 
From: <DWUTKA at marlow.com>
To: <accessd at databaseadvisors.com>
Sent: Wednesday, February 04, 2004 1:16 PM
Subject: RE: [AccessD] A2K: Can't update (ADO) Recordset


> 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
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com


More information about the AccessD mailing list