如何通过bindingnavigator saveitem函数将图像保存到sqlserver数据库中 [英] How to save image into sqlserver database by bindingnavigator saveitem function
本文介绍了如何通过bindingnavigator saveitem函数将图像保存到sqlserver数据库中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Private Sub PictBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictBindingNavigatorSaveItem.Click
Me.Validate()
Me.PictBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.MasterDataSet)
End Sub
这是我的代码.每当我单击保存"图标后输入数据时,都会发生以下错误.
在传递带有已修改的行的DataRow集合时,更新需要有效的UpdateCommand."
使用BindingNavigator将图像存储在sql server 2000中.
只是引用此链接..我的查询也一样..
http://www.dreamincode.net/forums/topic/74114-a-really -simple-database/ [ ^ ]
请帮助我.
This is my code.whenever i entered the data after click save icon, following error will occur.
"Update requires a valid UpdateCommand when passed DataRow collection with modified rows."
using BindingNavigator to store the image in sql server 2000.
just refer this link.. my query also same like this..
http://www.dreamincode.net/forums/topic/74114-a-really-simple-database/[^]
pls help me.
推荐答案
对不起..一种简单的逻辑..必须为一个字段设置主键. [pid int(primary key),pict image)on sql table creation ...
sorry frnds.. one simple logic.. have to set primary key for one field..(i.e)
[ pid int(primary key),pict image) on sql table creation...
这篇关于如何通过bindingnavigator saveitem函数将图像保存到sqlserver数据库中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文