大家好,
我的oracle数据库中的一个表中有一个字段是BLOB类型的,
当我用VC+ado访问这个表时,m_pRecordset->Open会出错,
而把这个字段从表中去掉之后就没有问题了,这是什么原因呢?该怎么解决?
各位请帮帮忙,谢谢
我的oracle数据库中的一个表中有一个字段是BLOB类型的,
当我用VC+ado访问这个表时,m_pRecordset->Open会出错,
而把这个字段从表中去掉之后就没有问题了,这是什么原因呢?该怎么解决?
各位请帮帮忙,谢谢
解决方案 »
- crystal report 数据源
- 菜鸟高分跪求高性能的Sql语句
- 怎样查出两条信息,一条id是固定的,另一条id要根据登陆的用户判断
- java.sql.SQLException: Listener refused the connection with the following error:
- 求救oracle调用出错的问题,急急!!!
- 求救!!!!!!!!!!!!!!!!!!!!!!
- 监听的设置问题
- 删除表空间后,为什么硬盘可用空间没有增加 ?
- 如何在oracle中建立自动加一字段?
- 如何将decode转化为标准sql
- 怎么计算某个日期所在的那个星期的全部日期
- 请教高手。。为什么我用IPM导入一个DMP后数据库就无法打开。。
因为blob 存储的可能是 图片 或者是 文件
你需要写一个过程来读取这个字段
//返回结果
StringBuffer sResult = null;
if (clob != null){
Reader reader = clob.getCharacterStream();
StringBuffer sbTemp = new StringBuffer();
BufferedReader buffReader = new BufferedReader(reader);
char[] cbuftemp = new char[1000];
while ((buffReader.read(cbuftemp)) != -1) {
sbTemp.append(cbuftemp.clone());
}
sResult = sbTemp;
}
return sResult;
}
public static StringBuffer getClobToString(ResultSet rs,int clobidx) throws SQLException
{
oracle.sql.CLOB clobField = ((OracleResultSet)rs).getCLOB(clobidx);
long clen=clobField.length();
char clobArray[] = new char[(int)clen];
int readednum= clobField.getChars(1,(int)clen,clobArray);
StringBuffer sb = new StringBuffer();
sb.append(clobArray);
return sb;
}