Results 1 to 6 of 6

Thread: [ADO] field property

  1. #1

    Thread Starter
    Lively Member neodatatype's Avatar
    Join Date
    Aug 2002
    Location
    Italy
    Posts
    103

    Question [ADO] field property

    Hi all!

    someone can tell me how can I do to know if a field is NULLABLE and ALLOW_ZERO_LENGTH?

    With ADODB, not ADOX.

    Thank you!
    > NeoDataType.net <

    Try my Free .Net Reporting Tool!

  2. #2
    PowerPoster
    Join Date
    Aug 2002
    Location
    NY, NY
    Posts
    2,139
    You may get Recordset.Fields("Field1").Type but it's probably not what you need.
    Roy

  3. #3
    Frenzied Member moinkhan's Avatar
    Join Date
    Jun 2000
    Location
    Karachi, Pakistan
    Posts
    2,011
    VB Code:
    1. If MyRec.Fields(1).Attributes And adFldIsNullable Then\
    2.  
    3.   Debug.Print "This field is Nullable"
    4. End If


    Try this code...

  4. #4
    PowerPoster
    Join Date
    Aug 2002
    Location
    NY, NY
    Posts
    2,139
    Yea, Attributes - forgot all about it.
    Roy

  5. #5

    Thread Starter
    Lively Member neodatatype's Avatar
    Join Date
    Aug 2002
    Location
    Italy
    Posts
    103
    Originally posted by moinkhan
    VB Code:
    1. Debug.Print "This field is Nullable"

    Try this code...
    Yes, this seems to work

    And for the "allow zero length"?

    Thanx!
    > NeoDataType.net <

    Try my Free .Net Reporting Tool!

  6. #6
    Frenzied Member moinkhan's Avatar
    Join Date
    Jun 2000
    Location
    Karachi, Pakistan
    Posts
    2,011
    Don't remember exactly but try the constant
    adFldMayBeNull

Posting Permissions

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



Click Here to Expand Forum to Full Width