Answer the question
In order to leave comments, you need to log in
Empty response Oracle c# WPF output query results to table?
Good hour!
See this question, I'm making a connection to a database like Oracle. I send a request, I get a response, but for some reason the response does not contain rows, but it contains the names of the columns, I can’t figure out where to dig ...
Connection string:
<connectionStrings>
<add name="myConnectionString"
connectionString="DATA SOURCE=localhost:1521/orcl;USER ID = SYS;PASSWORD = 111111111;DBA PRIVILEGE = SYSDBA;"
providerName="Oracle.ManagedDataAccess.Client"/>
</connectionStrings>
private void updateMyDataGrid() {
OracleCommand cmd = con.CreateCommand();
cmd.CommandText = "select * from firm";
cmd.CommandType = CommandType.Text;
OracleDataReader dr = cmd.ExecuteReader();
DataTable dt = new DataTable();
dt.Load(dr);
//помещаю полученный результат в DataGrid
myDataGrid.ItemsSource = dt.DefaultView;
dr.Close();
}
Answer the question
In order to leave comments, you need to log in
Check, after loading, the HasErrors property and see the errors via GetErrors()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question