Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2004

    Unanswered: Getting/Setting Field Format Property ADO


    I am connecting to a Access XP MDB file using VB6 via ADO 2.5.

    I am in need of getting the Field (format/layout) of the fields in a RecordSet and cannot find any information on this topic.

    Field Name 'DOB'
    Format 'dd mmm yyyy'

    Field Name 'LastName'
    Format '>'

    I want to be able to get that format string into a variable in VB.

    Any help would be appritiated.

  2. #2
    Join Date
    Mar 2004

    Re: Getting/Setting Field Format Property ADO

    Cycle through the properties in your field object and list them like this:

    For iCounter = 0 To 100

    debug.print rs.Fields.Item(0).Properties(iCounter).Name

    Next iCounter

    This will show you all the properties available to you in the field object. Then you will see if you can access a format property. Depending on which data provider you connect to you may or may not have that feature.

    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
    Mar 2004


    hey man thanks for the reply,

    i already tried that, only got 9 properties but and format wasnt one of them.

    the provider is jet oledb 4.0 which is the most current version and its not available in it.

    so i dont know what to do coz its kind of important, if not im probably gonna have to set a diff value in the field or make a table with field formats, hehe.

  4. #4
    Join Date
    Feb 2004
    In front of the computer
    Provided Answers: 54
    The closest thing I can think of is a FieldAttributeEnum. Aren't the actual formats of the items in the fields collection set by the client machine in its Regional Settings???


Posting Permissions

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