select *
from  tb
where column = 0x7306040F166AE4CCA5D107D37AD5试试这个

解决方案 »

  1.   


    create table #t(x varbinary(32))insert into #t(x)
     select 0x7306040F166AE4CCA5D107D37AD5
     select * from #t 
     where x=0x7306040F166AE4CCA5D107D37AD5/*
    x
    ------------------------------------------------------------------
    0x7306040F166AE4CCA5D107D37AD5(1 row(s) affected)
    */
      

  2.   

    你查询还是和普通的SQL一样查,只是最终显示文件的时候需要做下转换
    System.Data.SqlTypes.SqlBytes bytes = dr.GetSqlBytes(3);
                                pictureBox1.Image=Image.FromStream(bytes.Stream);//显示照片