无法解决的错误,崩溃请帮忙 [英] Untrappable errors, crashing please help

查看:97
本文介绍了无法解决的错误,崩溃请帮忙的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为SUR40开发了一个访问SQL Server的应用程序。 我们有9个运行此应用程序的表面设备。 


如果在事务中的SQL服务器上插入/更新数据时发生错误,即使在TRY CATCH块中,表面应用程序也会崩溃。


仅在曲面模式下发生。


在启用调试的情况下无法在Surface模式下重现。


在表面应用程序中重现非常简单:


------------------------- -----------------------


开始循环


打开数据库连接


开始交易


插入行


让线程休眠一两秒钟提交


结束循环。 


--------------------------------------- ---------


在水面设备和开发板上运行此操作,表面应用程序会在几分钟内崩溃

解决方案

您好,


请记住,在Surface模式下运行时,您正在运行应用程序由属于USERS组的SurfaceDefault用户标识的安全上下文。我不知道您使用哪个安全上下文来访问您的数据库表但是确保
运行您的安全上下文SQL操作对teh表具有适当的权限(如果您使用直接表访问)SELECT,UPDATE,INSERT, ...


如果您正在使用storeprocedure,请确保安全上下文在您的过程中具有Execute permision。


IF,例如您的安全上下文当你处于SUrface模式时,当前正在运行的配置文件,然后你需要确保SurfaceDefault用户对你的表具有适当的权限。


你也可以使用SQL服务器配置文件获得更多发送询问的信息


希望它会有所帮助


问候


serge


I have an application developed for SUR40 that accesses SQL Server.  We have 9 surface devices that run this application. 

If error occurs while inserting/updating data on SQL server within a transaction, the surface app crashes, even while in a TRY CATCH block.

This only happens in Surface Mode.

It cannot be reproduced in Surface Mode with debugging turned on.

Its pretty simple to reproduce, within the surface app:

------------------------------------------------

Begin Loop

open a DB connection

start a transaction

insert a row

have the thread sleep for a second or two and commit

End Loop. 

------------------------------------------------

Run this on the surface device and on your development pc and the surface app will crash within a few moments

解决方案

Hello,

Remember that when runing in Surface mode, you are running your application in a security context identify by the SurfaceDefault user wich belongs to USERS group. I do not know which security context you use to access your database table but be sure that the security context that runs you SQL operation has proper rights on teh table ( if you use direct table acess) SELECT, UPDATE, INSERT,...

If you are using storeprocedure be sure that the security context has the Execute permision on your procs.

IF for instance your security context is the current running profile when you are in SUrface mode, then you need to be sure that SurfaceDefault user has proper rights on your table.

You can also you the SQL server profile to get more information of the send querry

hope it will help

regards

serge


这篇关于无法解决的错误,崩溃请帮忙的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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