title: C# Oracle Displaying data set in a data grid
body: <p>I am trying to get a query from Oracle to display inside a data grid view in Visual Studio, but when I run the program I only get horizontal lines inside the data grid view, I'm not sure where I am going wrong?</p>
  
  <pre><code>        //declarations
          //declare sql string
          String strSQL, conString;
          String dateStart = startDate.ToString(dateFormat), dateEnd = endDate.ToString(dateFormat);
  
          //SQL string
          strSQL = "SELECT TO_CHAR(V.CASEID) AS CASEID, V.MESSAGESET, V.LOCALMESSAGETIME, V.TEXT";
          strSQL = strSQL + " FROM OPR.V_MKTVALIDATIONMESSAGE V, OPR.MKTCASE C";
          strSQL = strSQL + " WHERE V.LOCALMESSAGETIME &gt;= to_date('" + dateStart + "','MM/DD/YYYY hh24')";
          strSQL = strSQL + " AND V.LOCALMESSAGETIME &lt; to_date('" + dateEnd + "','MM/DD/YYYY hh24')";
          strSQL = strSQL + " AND V.CASEID IS NOT NULL";
          strSQL = strSQL + " AND V.CASEID = C.CASEID";
          strSQL = strSQL + " AND MESSAGESET = 'EXPORTER'";
          strSQL = strSQL + " AND C.STUDYMODEID in (32)";
          strSQL = strSQL + " AND (TEXT LIKE 'SCP%Begin exporting%' OR TEXT LIKE 'SCP%Export           completed%' OR TEXT LIKE 'ANS%Begin exporting%' OR TEXT LIKE 'ANS%Export completed%' OR TEXT LIKE 'SCD%Begin exporting%' OR TEXT LIKE 'SCD%Export completed%')";
          strSQL = strSQL + " ORDER BY CASEID, V.LOCALMESSAGETIME ASC";
  
  
          //setup the connection string aka username, password, and database to connect to
          conString = "Data Source=OPRPRD;User ID=" + userN + ";Password = " + pass + ";Unicode=True";
  
          //create connection object
          OracleConnection con = new OracleConnection(conString);
  
          //open connection
          con.Open();
  
          //decalare oracle connection
          OracleCommand ocom = new OracleCommand();
  
          //assign connection to command
          ocom.Connection = con;
  
          //assign command string to oracle command
          ocom.CommandText = strSQL;
  
          OracleDataAdapter dataAdapter = new OracleDataAdapter();
  
          dataAdapter.SelectCommand = ocom;
  
          dataAdapter.Fill(ds, "itscedExportTable");
          Console.WriteLine("{0}", ds.Tables.ToString());
          dataGrid1.DataContext = ds;
          dataGrid1.ItemsSource = "itscedExportTable";
  
  
          con.Close();
  </code></pre>