idatareader问题
为什么我的idatareader出错......?
byteSize = _reader.GetBytes(_reader.GetOrdinal(sFieldName), 0, null, 0, 0);
我想从数据库中检索图像sFieldName是数据库列名称......它向我显示指定的演员无效。消息......什么我做吗?在c#窗口vs05上工作....
sFieldName是一个字符串....它是数据库的列名,列类型是image 我的数据库列名称是“BoardImage”
sFieldName="BoardImage"
oBoardDetail.BoardImage =oReader.GetImage("BoardImage");
这里 oBoardDetail 是一个类对象,BoardImage 是一个类属性类型 Image
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最有可能的是,sFieldname 列不是 Image 或 VarBinary 列。
请更新有关数据库系统、表结构、select 语句的缺失信息。
Most likely, the column sFieldname is not an Image or VarBinary column.
Please update the missing info on database system, table structure, select statement.