并发错误-很奇怪 [英] Concurrency Error - Weird

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

问题描述

首先,我想对多次发布表示歉意,因为我将其发布在SQL论坛上,但是有人建议将其放在此处.这是我的问题:-

First off I would like to apologies for multi posting as I posted this on the SQL forum but someone did suggest putting it here. Here is my problem :-

 



好的,已经使用sqlce在vb.net cf中开发了一种表单.我知道这是vb.net部分,但我认为这是一个数据问题.我有一个名为STORES的表,该表具有两列的主键(ST_STORECODE和ST_CY_CODE).

我用所有商店数据填充数据集,并在其中找到所需的行:-

Hi,

Okay have developed a form in vb.net cf using sqlce. I know this is the vb.net section but I feel it's a data issue. I have a table called STORES which has a primary key of two columns (ST_STORECODE & ST_CY_CODE).

I populate a dataset with all the store data and to the following to find the required row:-

代码:

推荐答案

对于初学者来说,经常发生两次更新而无需重新填充数据集的情况.

This happens often with beginners when an update is done twice without refilling the dataset.

通过DataAdapter更新,将检查(在框架1.x中,仅通过字段检查,在时间戳中,也通过时间戳检查)是否已更改数据库中数据集中的原始行数据. (这是一个并发错误)

With an DataAdapter update there is checked (in framework 1.x only by the fields and by newer also by the timestamp) if the original row data which is in a dataset is already changed in the database. (This is then a concurrency error)

如果您执行两次更新,则可能会发生这种情况,因为数据库中的数据与原始数据行中的数据不同(您实际上是自己完成的)

If you do twice an update, then that can happen because the data in the database is different from the data in the original datarow (you did that in fact yourself)

 


这篇关于并发错误-很奇怪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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