Results 1 to 3 of 3

Thread: dataset, does table exist?

  1. #1

    Thread Starter
    Hyperactive Member gmatteson's Avatar
    Join Date
    Feb 2002
    Location
    Rhode Island, USA
    Posts
    293

    dataset, does table exist?

    How can i tell if a certain table is already in the dataset?

  2. #2
    Addicted Member
    Join Date
    Aug 2003
    Posts
    153
    VB Code:
    1. Dim bolTableExists As Boolean
    2. Dim myTable As DataTable
    3.  
    4. myTable = myDataSet.Tables("TableName")
    5.  
    6. If myTable = Nothing Then
    7.            bolTableExists = False
    8. Else
    9.            bolTableExists = True
    10. End If

    You obviously don't need to use the boolean values, basically just use the tables property to find the dataset.

  3. #3

    Thread Starter
    Hyperactive Member gmatteson's Avatar
    Join Date
    Feb 2002
    Location
    Rhode Island, USA
    Posts
    293

    thanks.

    works great.

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