在sql server中上传图片 [英] upload a image in sql server

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

问题描述

当我使用此命令时,它会保存< binary>在野外但不将图片展示出来

com = New SqlCommand(插入table1(image)values(" ImagePictureBox.Image)",Me.con)
adp.SelectCommand = com
table =新数据表
adp.Fill(table)

当我使用使向导连接成为数据源时,然后将其拖放到窗体上,以便它保存并显示第一张图片而不是第二张,这是当我保存第二张图片时出现的错误

当传递带有修改后的行的数据行集合时,更新需要有效的更新命令.

When I use this command so it save <binary> in the field but not show picture in out put

com = New SqlCommand("insert into table1(image)values(''ImagePictureBox.Image'')", Me.con)
adp.SelectCommand = com
table = New Data Table
adp.Fill(table)

and when i use making wizard connection mean data source and then i drag and drop on the form so it save and show first picture not second this is bellow error when i save second picture

Update requires a valid Update Command when passed Data Row collection with modified rows.

推荐答案

您是否已搜索过很多文章,涵盖了此内容
http://www.codeproject.com/KB/database/albumviewer.aspx [ ^ ]
Have you searched, there are many articles that cover this
http://www.codeproject.com/KB/database/albumviewer.aspx[^]


这篇关于在sql server中上传图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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