Results 1 to 8 of 8

Thread: Read Column Type, Lengtg from Access Tables

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2001
    Posts
    843

    Read Column Type, Lengtg from Access Tables

    Hi everyone. I am trying to read the table columns definitions of tables in an access database. How can I do this?

    Thank you very much...!
    Last edited by Andreex; Nov 22nd, 2004 at 09:57 AM.
    "The difference between mad and genius is the success"

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2001
    Posts
    843
    bump
    "The difference between mad and genius is the success"

  3. #3
    Frenzied Member Asgorath's Avatar
    Join Date
    Sep 2004
    Location
    Saturn
    Posts
    2,036
    Hi

    Well checkout the dataset class in msdn there's everything you need...

    Regards
    Jorge
    "The dark side clouds everything. Impossible to see the future is."

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2001
    Posts
    843
    how can the dataset help me reading the column type, length, if it is the primary key, max length of field, etc???
    "The difference between mad and genius is the success"

  5. #5
    Frenzied Member Asgorath's Avatar
    Join Date
    Sep 2004
    Location
    Saturn
    Posts
    2,036
    Hi

    As you know a dataset is a collection of datatables and each datatable is a collection of DataColumn and DataRow. The DataColumn has many useful properties one of them being .DataType.

    Just browse all DataColumns of each table you need to gather information.

    Regards
    Jorge
    "The dark side clouds everything. Impossible to see the future is."

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2001
    Posts
    843
    ok sounds good.... oh... hummm... so when yo do a dataadapter.fill(table) the table object columns will have that info automatically?????
    "The difference between mad and genius is the success"

  7. #7
    Frenzied Member Asgorath's Avatar
    Join Date
    Sep 2004
    Location
    Saturn
    Posts
    2,036
    Originally posted by Andreex
    ok sounds good.... oh... hummm... so when yo do a dataadapter.fill(table) the table object columns will have that info automatically?????
    Yes if you select all fields in the table like this 'select * from Mytable'

    Regards
    Jorge
    "The dark side clouds everything. Impossible to see the future is."

  8. #8

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2001
    Posts
    843
    oh ok... well that makes a lot of sense...

    thanks a lot for your help
    "The difference between mad and genius is the success"

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