Checking if datatable exists

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Paul Sampson

    #1

    Checking if datatable exists

    Hi,

    I'm using the DataAdapter/DataSet/DataTable structures and the native SQL
    Server provider. I have a generic function that clears my datatable then
    fills it again each time. However on the first call to my function the
    datatable.Clear () method fails, since the table has not been created at this
    stage. I can't check rowcount or anything, for the same reason.

    How do I test whether the table object exists? In VB I would have done
    something like: if exists(obj). I something like this in C#.

    Many thanks


Working...