怎么才能把图片存到SQL SERVER 2000中!! 将图片文件以二进制文件读入,存入image数据类型的项中. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 可以用ado的stream对象可以轻松读进去 TStream * bs = ptQuery->CreateBlobStream( ptQuery->FieldByName( "picture_content" ), bmRead); if( ptQuery->FieldByName( "picture_type_id" )->AsInteger == 0 ) { TJPEGImage *j=new TJPEGImage; bs->Position=0; j->LoadFromStream(bs); Image2->Picture->Assign( j ) ; delete j; } else if ( ptQuery->FieldByName( "picture_type_id" )->AsInteger == 1 ) { Graphics::TBitmap * Bit=new Graphics::TBitmap(); Bit->LoadFromStream( bs ); Image2->Picture->Bitmap = Bit ; delete Bit ; } else { TIcon * ic = new TIcon ; ic->LoadFromStream( bs ); Image2->Picture->Icon = ic ; delete ic ; } 求助:update 前30条符合件条的记录. 建表必须建索引吗? 分页及排序存储过程求助,100分,先到先得! 分组汇总查询是如何获取汇总的是哪个分类 有关全文检索的问题 关于SQL2005存储过程分页,执行显示对象名 'WebPager' 无效,请高手解决。 关于如何将文本文件导入到sqlserver中 一个EXEC(@STR)的问题 怎样删除重复的记录? 如何用生成.sql文件的方法备份完整的数据库(不损失原来数据库中的数据) 问:关于SQL2000 急!!如何在Sql Server中保存char或是byte数组
if( ptQuery->FieldByName( "picture_type_id" )->AsInteger == 0 )
{
TJPEGImage *j=new TJPEGImage;
bs->Position=0;
j->LoadFromStream(bs);
Image2->Picture->Assign( j ) ;
delete j;
}
else if ( ptQuery->FieldByName( "picture_type_id" )->AsInteger == 1 )
{
Graphics::TBitmap * Bit=new Graphics::TBitmap();
Bit->LoadFromStream( bs );
Image2->Picture->Bitmap = Bit ;
delete Bit ;
}
else
{
TIcon * ic = new TIcon ;
ic->LoadFromStream( bs );
Image2->Picture->Icon = ic ;
delete ic ;
}