小弟:通过下面的代码.
     来保存图片.
this.openFileDialog1.ShowDialog();
            Stream s ;
     //this.openFileDialog1.ShowDialog();
if ( this.openFileDialog1.OpenFile()!= null  )
{     
    s = this.openFileDialog1.OpenFile();
byte[] bytes = new byte[s.Length];
            s.Read(bytes,0,bytes.Length);
          
SqlConnection con = new SqlConnection("server = .. ; database =..; uid  = ..; password =..;"); 
            string sql  = "insert into picteset (pic ) values ('"+ bytes +"') ";
            SqlCommand cmd = new SqlCommand(sql , con ); cmd.Connection.Open();
for(int i =0 ; i<1 ;i++)
{
cmd.ExecuteNonQuery();
}
cmd.Connection.Close();
Bitmap bm = new Bitmap(s); this.pictureBox1.Image = bm;
            s.Close();数据表如下:
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[picteset]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[picteset]
GOCREATE TABLE [dbo].[picteset] (
[id] [int] IDENTITY (1, 1) NOT NULL ,
[pic] [image] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO在汇入图片的时候,我可以在debug的过程中,看到bytes的长度明明是 771402 。
但是,真正汇入到数据库中的只有  这样一段 0x53797374656D2E427974655B5D
当我,再次取出来的时候,发现取出来的数组中 ,长度只有13 。
非常奇怪,
那个高手,能不能说说为啥