I have problem to get image bytes data from oracle. reader("image")
always returning 0 length. Is their any workaround? If i used oledb
then its working but not working with Microsoft EnterpriseLibrary
.
using (IDataReader reader = ExecuteNonQueryOracle(Query))
{
while (reader.Read) {
dict("image") = reader("image");
}
}
public object ExecuteNonQueryOracle(string Query)
{
using (dbCommand == CurrentDatabase.GetSqlStringCommand(Query)) {
dbCommand.CommandType = CommandType.Text;
return CurrentDatabase.ExecuteReader(dbCommand);
}
}
If the ExecuteNonQuery method is returning 0 then one reason could be quite obvious that your query's where clause doesn't match any row in the table(s).
i got this thread from web this might help
Another case which happened with me was, when i was using Enterprise library Data Application block to execute the Update sql query using ExecuteNonQuery method, I was passing the input parameters using AddInParameter method of the Database object in order which didnt match with the order of parameters in my update sql especially the input parameter in where clause.So once i passed in where clause parameter using AddInParameter in the end of the bunch of AddInParameter clause, the problem solved immediately.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With