我在oracle 中建了table
name varchar,
photo blob,我用ado连上table, 当我用
select name,photo from table where name='lile'
时报 ole 错误, 不支援的类型 为什么?
但当我 只查
select name from table where name='lile' 没错?为什么?
用 sql语句不能查blob字段嘛?我怎么才能查 name='lile' 的photo,再显示
在image中
name varchar,
photo blob,我用ado连上table, 当我用
select name,photo from table where name='lile'
时报 ole 错误, 不支援的类型 为什么?
但当我 只查
select name from table where name='lile' 没错?为什么?
用 sql语句不能查blob字段嘛?我怎么才能查 name='lile' 的photo,再显示
在image中
给为大虾帮帮忙?
大家共同进步好么?
select * from table的时候,虽然此时的数据集里面包含photo这个字段,但是并没有数据所以你需要对该字段进行流操作!
比如,我要查 lile 的照片,怎么办?
给点例子看看?
1 你用的是oracle哪个版本?
2 你的ado有否打过补丁?
3 在建表时字段类型选择的是blob吗
2.我不知道怎么查ADO版本?3. 我在建表时选择的是 BLOB 类型
query1.close;
query1.sql.clear;
query1.sql.add('select * from table where name='lile'');
query1.open;//这里应该不会有错
TBlobField(query1.fieldbyname('photo').savetofile('temp.bmp');//这里的扩展名根据你的库里存储而定
image.picture.loadfromfile('temp.bmp')