create table #t(x varbinary(32))insert into #t(x) select 0x7306040F166AE4CCA5D107D37AD5 select * from #t where x=0x7306040F166AE4CCA5D107D37AD5/* x ------------------------------------------------------------------ 0x7306040F166AE4CCA5D107D37AD5(1 row(s) affected) */
create table #t(x varbinary(32))insert into #t(x)
select 0x7306040F166AE4CCA5D107D37AD5
select * from #t
where x=0x7306040F166AE4CCA5D107D37AD5/*
x
------------------------------------------------------------------
0x7306040F166AE4CCA5D107D37AD5(1 row(s) affected)
*/
System.Data.SqlTypes.SqlBytes bytes = dr.GetSqlBytes(3);
pictureBox1.Image=Image.FromStream(bytes.Stream);//显示照片