why My idatareader make error .....?
byteSize = _reader.GetBytes(_reader.GetOrdinal(sFieldName), 0, null, 0, 0);
I want to retrive image from database here sFieldName is database column Name......it show me Specified cast is not valid. message ......what i do?work on c# window vs05....
sFieldName is a string ....it's the column name of database and column type is image My database column name is "BoardImage"
sFieldName="BoardImage"
oBoardDetail.BoardImage =oReader.GetImage("BoardImage");
here oBoardDetail is a class object and BoardImage is a class property type Image