Detect updatable ado fields 
Author Message
 Detect updatable ado fields

    When I try to execute an INSERT or UPDATE SQL sentence with an
autonumeric field, ado return the following error: Can't not update
'fieldname': field not updateble. I construct the SQL sentence dinamically
obtaining field names from ado field collection. Is there any way to know
which fields are updateble and which not?

Thanks in advance.

Mon, 22 Dec 2003 00:14:13 GMT
 Detect updatable ado fields


...yes, there is

the item property in the fields collection has the collection properties.
you can find a property named ISAUTOINCREMENT, so your code would
be something like:

for i = 0 to RS.Fields.Count -1
    If RS.Fields.item(1).Properties("ISAUTOINCREMENT") = false Then
        ' update
    End If

Frank Stocker

Mon, 22 Dec 2003 01:44:17 GMT
 [ 2 post ] 

 Relevant Pages 

1. Check whether field is updatable in an ado recordset

2. Updatable views not updatable when using Client cursor

3. ADO Command produces recordset that is NOT UPDATABLE????

4. non-updatable ADO Recordset: HELP

5. Access 2000 form with ADO recordset is not updatable

6. ADO Command produces recordset that is NOT UPDATABLE????

7. Problem: Field Not Updatable ?!

8. Problem with Field.Updatable property

9. recordset field updatable?

10. How to set fields to be not updatable

11. can't mark dao field as updatable

12. Binding Collection Error - Field not Updatable

Powered by phpBB® Forum Software