我怎样才能插入&看图 [英] How can I insert & view image
本文介绍了我怎样才能插入&看图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
i was create table using id int, IM_name varchar , Image image using data type
also i was create insert update sp
i was try to insert & update but i can't
我尝试过:
asp.net c#3层架构
What I have tried:
asp.net c# 3 tier architecture
推荐答案
如果我是你,我会借此机会离开图像数据类型。它将在下一版本的SQL Server中删除,因此您应该将其替换为futureproof数据类型,例如VarBinary(max)
。 ntext,text和image(Transact-SQL) [ ^ ]
但是,要回答您的问题,您需要将图像的字节数组传递到字段中。使用SqlDbType.Binary作为SQL参数的类型。
If I were you, I would take this opportunity to move away from the image data type. It's being removed in the next version of SQL Server, so you should look to replace it with a "futureproof" data type such asVarBinary(max)
. ntext, text, and image (Transact-SQL)[^]
However, to answer your question, you will need to pass a byte array of your image in to the field. Use SqlDbType.Binary as the type for your SQL Parameter.
这篇关于我怎样才能插入&看图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文