I have cursor named generuj_cene_wypoz(), the cursor works in database but I don't know how to call it correctly in C# btw the connection between the program and the database works.
public void question2(string name)
{
OracleCommand cmd = con.CreateCommand();
cmd.CommandText = name;
cmd.CommandType = CommandType.StoredProcedure;
OracleDataReader dr = cmd.ExecuteReader();
DataTable dt = new DataTable();
dt.Load(dr);
myDataGrid.ItemsSource = dt.DefaultView;
dr.Close();
}
private void Button_Click_1(object sender, RoutedEventArgs e)
{
question2("exec generuj_cene_wpoz()");
}
to connect to the database I am using
Oracle.ManagedDataAccess.Client;
Oracle.ManagedDataAccess.Types;