系统崩溃,因为SQL Server 2005 [英] System Crash because sql server 2005

查看:83
本文介绍了系统崩溃,因为SQL Server 2005的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到一个问题,我使Windows应用程序可以在一个站点上的许多终端和服务器上运行.当两个或多个终端同时访问相同的数据时,屏幕会死机.

就像两个生成票据的终端机一样,他们同时没有票据,问题就来了.

i have a problem i made windows application that run on so many terminal and server placed at one station. When two or more terminal access same data at same time the screen got hang an just crash.

like two terminal generating bill they got bill no at same time an here the problem come.

推荐答案

糟糕!现在,这可能是您的错:但是如果没有数据库设计和相关的代码片段,则很难准确地告诉您您所做的事情.但是,我准备向您自己生成行ID(或类似数据)的少量资金投入,并且多用户访问正在尝试创建重复的行...

[edit]没有",格里夫,不是有".我需要咖啡因-OriginalGriff [/edit]
Oops! Now, that is probably your fault: but without the database design and relevant code fragments it is difficult to tell exactly what you have done. However, I would be prepared to wager a small amount of money that you are generating your row id''s (or similar) yourself and multiuser access is trying to create duplicates...

[edit]"without", Griff, not "with". I need caffeine - OriginalGriff[/edit]


我怀疑您是根据身份值在客户端中生成账单号,但在获取值时并没有存储记录.因此,下一个用户将获得相同的值.

您需要做2件事情之一:
1获得订单号时创建并存储记录,从而将其删除.

2仅在存储所有数据时获取订单号.到目前为止,这是推荐的方法!如果您有带有订单标题的订单行,那么您还必须学习交易!
I suspect you are generating the bill number in the client based on the identity values but you are not storing the record when you get the value. Therefore the next user gets the same value.

You need to do 1 of 2 things:
1 Create and store the record when you get the order number thereby removing it.
OR
2 Only get the order number when all the data is stored. This is by far the recommended method! If you have order lines with the order header then you are going to have to learn about transactions as well!


这篇关于系统崩溃,因为SQL Server 2005的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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