Hi Everyone,
I have this piece of code that keeps throwing an error. I have no idea why it is throwing this error. The error being thrown is:
Object not set to instance of an object
Code:
DbConnection conn = myFactory.CreateConnection();
conn.ConnectionString = connectionString;
using (conn)
{
conn.Open();
DbCommand cmd = conn.CreateCommand();
cmd.CommandText = sqlStatement;
cmd.CommandType = CommandType.Text;
DbDataReader reader = cmd.ExecuteReader();
myTable.Load(reader);
}
return myTable;
Thanks for all the help
-zd
