C# C Oracle在数据网格中显示数据集

C# C Oracle在数据网格中显示数据集,c#,oracle,C#,Oracle,我试图从Oracle获取一个查询,以便在VisualStudio的数据网格视图中显示,但是当我运行该程序时,我只在数据网格视图中获得水平线,我不确定我哪里出错了 //declarations //declare sql string String strSQL, conString; String dateStart = startDate.ToString(dateFormat), dateEnd = endDate.ToStri

我试图从Oracle获取一个查询,以便在VisualStudio的数据网格视图中显示,但是当我运行该程序时,我只在数据网格视图中获得水平线,我不确定我哪里出错了

        //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 >= to_date('" + dateStart + "','MM/DD/YYYY hh24')";
        strSQL = strSQL + " AND V.LOCALMESSAGETIME < 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();

如果您现在没有输入数据库,请关闭caps lock=你为什么对我们大喊大叫?我们只是想帮忙。