I am using Oracle.ManagedDataAccess.Core v2.18.6 and I am experiencing an issue when executing a command that includes joins to other tables. I've tried different join syntaxes, etc., and have confirmed joining any table causes the datareader to be empty (.HasRows = false)
I even took the exact same statements and ran them in Oracle SQL Developer and rows come back. What am I missing?
string oradb = "connection string info here";
OracleConnection conn = new OracleConnection(oradb); // C#
conn.Open();
OracleCommand cmd = new OracleCommand();
cmd.Connection = conn;
//if I select from one table the data reader contains data
cmd.CommandText = "select * from patients where personal_num=1";
//if I select from parent and child table data reader does not contain data
cmd.CommandText = "select a.* from patients a inner join patient_history b on a.personal_num = b.personal_num where personal_num=1"
cmd.CommandType = CommandType.Text;
OracleDataReader dr = cmd.ExecuteReader();
dr.Read();
label1.Text = dr.GetString(0);
conn.Dispose();