图片栏位错误 [英] Image Field give Error

查看:73
本文介绍了图片栏位错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

专家!!

我创建Windows应用程序,在此我使用1个表来存储公司信息,并且还希望存储公司徽标.

我使用SP填充表格,因此在表单一侧我传递了参数数组,然后传递给SP.

我使用属性来设置属性的值,但是在返回时间中,哪种数据类型用于c#表单端.因为它不支持图像数据类型.



THX .... !!!

hi Expert!!

i create windows application, in this i use 1 table for store company information and also wants to store Company Logo.

i fill table using SP, so in form side i pass parameter array and then i pass to the SP.

i use properties to set value of properties, but in return time which data type is use for c# form side. because its not support image data type.



THX....!!!

推荐答案

对于二进制图像,应使用byte数据类型或任何对象类型.
您只需要从二进制到字节数组&的转换即可.从字节数组到二进制.请参阅:
C#图像到字节数组和字节数组到图像转换器类 [ ^ ]

--Amit
For binary image you should use byte data type or any object type.
Only thing you need to is conversion from binary to byte array & from byte array to binary. Refer this:
C# Image to Byte Array and Byte Array to Image Converter Class[^]

--Amit


看看以下链接:
在SQL Server中存储或保存图像 [ ^ ]
使用Streded Procedures和C#从SQL Server存储和检索图像.净 [ ^ ]
使用Microsoft .NET从SQL Server存储和检索图像 [ ^ ]

建议不要将图像存储在数据库中,而应尝试将其存储在文件夹中并在应用程序中检索它们.将图像路径作为varchar存储在数据库中,而不是使用BLOB或任何其他数据类型.
Have a look at following links:
Store or Save images in SQL Server[^]
Storing and Retrieving Images from SQL Server Using Strored Procedures and C#.net[^]
Storing and Retrieving Images from SQL Server using Microsoft .NET[^]

It is not advisable to store images in the database, rather try storing them into a folder and retrieve them in your application. Store the image path in the database as a varchar instead of using BLOB or any other datatype.


这篇关于图片栏位错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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