如何在SQL搜索图片框C# [英] How SQL search picture box C#

查看:81
本文介绍了如何在SQL搜索图片框C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

picturebox.image插入sql保存比

我的problam搜索sql图片c#



我尝试了什么:



pictureBox1.Image =(dr [pict]。ToString());

解决方案

< blockquote>为了获取图像并将其放入图片框,您需要将字节数据分配到Image属性,而不是将其转换为字符串。



例如,看看 c# - 如何加载从SQL Server到图片框的图像? - 堆栈溢出 [ ^ ]


picturebox.image insert sql save than
my problam search sql picture c#

What I have tried:

pictureBox1.Image=(dr["pict"].ToString());

解决方案

In order to fetch the image and place it into a picture box, you need to assign the byte data into the Image property, not convert it to string.

For example, have a look at c# - How to load image from SQL Server into picture box? - Stack Overflow[^]


这篇关于如何在SQL搜索图片框C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆