Results 1 to 3 of 3
  1. #1
    Join Date
    May 2004

    Unanswered: Getting the PropertyAttributesEnum value in ADO


    Im hoping to be able to find out wether a field in a table is required to have a value. I found about the "PropertyAttributesEnum" for ADO here:

    Problem is, I dont know how to retrieve this value. I know how to loop through all fields, in fact Im allready doing this to get names etc like this:

    For Each X in getall.Fields

    ' Code


    Also, if anyone knows how to retrieve the default value, I'd be grateful.

    Thanks a lot

  2. #2
    Join Date
    Mar 2004
    Which property are you looking for? Here is a general way of searching the properties in an ADO recordset (replace "Transaction DDL" with the property you are looking for).

    For iCounter = 0 To rsSCIROCCO.Properties.Count - 1
    If StrComp(rsSCIROCCO.Properties(iCounter).Name, "Transaction DDL") = 0 Then
    MsgBox "property found"
    Exit For
    End If
    Next iCounter

    Once you have the property position you can see its value like this

    MsgBox rsSCIROCCO.Properties(iCounter).Value

    Download for FREE the ADO/DAO Data Controls that makes life EASIER developing database applications in: VB, FoxPro, Access, VC++, .NET etc... Navigate, Add New, Delete, Update, Search, Undo and Save your changes. Supports Disconnected Recordsets and Transactions!

    Or try our Ask An Expert service to answer any of your questions!

  3. #3
    Join Date
    May 2004

    Sorry, I have realised now that that is not what I was looking for (the PropertyAttributesEnum) because that is not to do with fields. What I was basically looking for was a way to loop through each field, and find out wether a value is required in that field. Been searching and trying for ages yesterday though and I drew the conclusion that to the best of my knowledge, it can't be done.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts