I have connected my Visual studio 2013 to Oracle XE 11 Database. I'm trying to retrieve information from the tables I have in the database using the following code, but it seems that the array decor isn't getting initialised with the values I'm setting it with in the foreach loop. Please help.
conn.Open(); // it is an OleDbConnection
String[] decor;
DataTable table1 = new DataTable();
OleDbDataAdapter oda1 = new OleDbDataAdapter("select name from Product where Commodity_Type='decor'",conn);
oda1.Fill(table1);
int j=0;
foreach (DataRow row in table1.Rows)
{
decor[j] = row["name"].ToString();
j++;
}