如题!
解决方案 »
- this.invoke(委托)启动的真是子线程吗
- PHP如何和WinForm程序通信
- 关于希尔算法,越详细越好
- dataset.select的问题
- 如何用.NET开发出似QQ的聊天软件
- 求助:编写服务器socket侦听时,在发送完响应消息时,服务器一直处于忙碌(界面鼠标沙斗状)但还能处理客户请求
- 对C#中标签的用途一直不很明白,如“[System.ComponentModel.DesignerCategory("Code")]”
- 大侠们:能否推荐一本关于C#类设计的好书,我想去买本来学习!谢谢!
- 极力推荐好地方
- 谁有csgl
- 问一个托管调试助手(MDA)中LoaderLock 的问题,请这方面的高手说一下
- 还停留在D7中的同行们目前工资有多少? 转了.NET的人工资又是多少?
this.pesrImage.DataBind();
http://blog.csdn.net/knight94/archive/2006/03/31/645987.aspx
这样的话应该要怎么做呢!
public Image getImage(object o)
{
Image img = null;
byte[] bts = o as byte[];
if (bts != null)
{
MemoryStream ms = null;
try
{
ms = new MemoryStream(bts, 0, bts.Length);
{
img = Image.FromStream(ms, true);
}
}
catch{}
finally
{
if (ms != null)
{
ms.Close();
}
}
}
return img;
}
' 建立连接
Dim con As SqlConnection = New SqlConnection("Server=(local)\NetSDK;Database=北风贸易;Integrated Security=SSPI") ' 建立数据命令对象(亦即 SqlCommand 对象)
Dim foxCMD As New SqlCommand foxCMD.Connection = con
foxCMD.CommandText = "SELECT * FROM dbo.虚拟工作室 WHERE 身份证号码 = @Id" foxCMD.Parameters.Add("@Id", SqlDbType.NVarChar, 10).Value = ListBoxId.SelectedItem.ToString
' 打开连接
con.Open() Dim myReader As SqlDataReader = foxCMD.ExecuteReader(CommandBehavior.CloseConnection Or CommandBehavior.SingleResult Or CommandBehavior.SingleRow)' 建立一个 Byte 类型的数组(也就是字节数组)
Dim bytBLOBData(myReader.GetBytes(13, 0, Nothing, 0, Integer.MaxValue) - 1) As Byte ' 使用 GetBytes 方法将 照片 字段中的图像数据读入字节数组中
myReader.GetBytes(13, 0, bytBLOBData, 0, bytBLOBData.Length) ' 根据字节数组来建立一个 MemoryStream 对象
Dim stmBLOBData As New MemoryStream(bytBLOBData) ' 将 MemoryStream 对象加载 PictureBox 的 Image 属性中
PictureBox1.Image = Image.FromStream(stmBLOBData)
为何提示无效参数?vs2005中