Results 1 to 2 of 2

Thread: how to get the lenght of the data field.

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2002
    Location
    nothing
    Posts
    1

    how to get the lenght of the data field.

    hi all
    Can you tell me how to get information of a data field in a database.Exam :the lenght of the field
    thanks !!!
    (^!^)(^!^)(^!^)(^!^)(^!^)(^!^)(^!^)

  2. #2
    Registered User
    Join Date
    Nov 2002
    Location
    Växjö, Sweden
    Posts
    314
    What approach are you using? Is it the MaxLength of the field, or is it a specific records length in the field? Do you already have the table loaded into a dataset?

    If the last question is answered yes you can do something like this using a typed dataset......

    ds.Table.NameColumn.MaxLength, if it is the maxlength you want.

    or

    ds.Table(index).Name.Length, if it is the length of a specific record.

    If this is not tha case, please elaborate.

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