Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to find out if a specific table exists in a dataset

Tags:

c#

dataset

I have created an application which reads the records from excel files and 2D arrays and after merging them it will pass the data to ds.table[x]. i would like to know if there is a way for me to check if the ds.table[x] exist? and how can i do that in code behind ?

like image 827
Ali Avatar asked Jun 15 '15 02:06

Ali


Video Answer


1 Answers

You can check with the following if statement,

 if(ds.Tables.Contains("TableName"))
like image 83
coder231 Avatar answered Sep 23 '22 14:09

coder231