textcopy /S yourservername /D Northwind /T tablename /C yourcolumn /W "where a = 3 " /F yourbmp.bmp /I /Z

解决方案 »

  1.   

    where 语句根据你的要求写textcopy 工具位置你自己找找看
      

  2.   

    这是用TADOQUERY  的方法String stSql = "declare @nIndex int "
                       " select @nIndex= max( picture_Id ) from s_picture_library"
                       " if( @nIndex is null ) set @nIndex = 0 "
                       " set @nIndex = @nIndex + 1 "
                       " insert into picture_library( picture_Id,picture_Name,"
                       " Picture_Type_id,picture_Content,Picture_UpdateTime)"
                       " values(@nIndex,:Pic_Name,:Pic_Type,:Pic_Content,getdate())" ;
        ptQuery->Close() ;
        ptQuery->SQL->Clear();
        ptQuery->SQL->Add( stSql ) ;
        //ptQuery->SQL->Add( "update a_pic_library set pic_name=:pic_name,pic_type=:Pic_Type,pic_content=:pic_content " ) ;
        ptQuery->Parameters->ParamByName( "Pic_Type" )->Value = OpenDialog1->FilterIndex - 1 ;
        ptQuery->Parameters->ParamByName( "pic_name" )->Value = ExtractFileName( OpenDialog1->FileName );
        ptQuery->Parameters->ParamByName( "pic_content" )->LoadFromFile( OpenDialog1->FileName, ftBlob );    ptQuery->ExecSQL() ;