title: Checking Table Existance: Table doesn't exist while it exists
body: <pre><code>public bool CheckTblExist(string TblName)
      {
          try
          {  
              string cmTxt = "select case when exists" 
              + "((select * from information_schema.tables " 
              + "where table_name = '" + TblName + "')) then 1 else 0 end";
  
              var cmd = new OdbcCommand(cmTxt);
              if ((int)cmd.ExecuteScalar() == 1) exists = true;
              MessageBox.Show(TblName + " table Exists.");
          }
          catch
          {
              exists = false;
              MessageBox.Show(TblName + " table does not Exist.");
          }
          return exists;
      }
  </code></pre>
  
  <p>Using VS2012,C# I've created manually mdf file named Tasoo1.mdf inside App_Data with connection named con. Tasoo.mdf already has 1 table named '1010' created using </p>
  
  <pre><code>string cmdText = "CREATE TABLE [" + tblname + "]" 
                   + "(column_name1 int,column_name2 int,column_name3 int)";
  </code></pre>
  
  <p>Excauting the code, gave me- table doesn't exist? any idea how to solve this..thanks alot in advance.</p>