Results 1 to 2 of 2

Thread: How to get the column name where the value was found?

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2005
    Posts
    2

    How to get the column name where the value was found?

    I have a query which searches the given value from 5 columns in a table? Don't ask me why. Is there way to get the column name where the value was found? I'm using Access as a database.
    Last edited by dcln; Jan 22nd, 2005 at 06:48 AM.

  2. #2
    Frenzied Member MrGTI's Avatar
    Join Date
    Oct 2000
    Location
    Ontario, Canada
    Posts
    1,277

    Post

    This returns the name of the first (0) column in a DataSet:
    VB Code:
    1. Dim sColumnName As String = DS.Tables("sample").Columns.Item(0).ToString
    ~Peter


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