使用事务范围和查询 [英] Using transaction scope and querying

查看:45
本文介绍了使用事务范围和查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用带有Oracle DB的实体框架。我尝试使用事务范围(因为我想要回滚选项):

I'm using entity framework with oracle DB. I tried to use transaction scope (because I want the option to rollback):

using (TransactionScope ts = new TransactionScope())
{
      .....
}

问题是,当我尝试在using语句中查询时,会引发异常:

The problem is that when I'm trying to query inside the using statement, an exception is thrown:

无法加载DLL'oramts.dll':指定的模块无法找到。 (来自HRESULT的异常:0x8007007E)

我该如何解决这个问题?

How can I solve this problem?

推荐答案

在安装Oracle客户端连接软件时,默认安装中不包含Oramts.dll文件。
我想您必须安装 Microsoft Services Server的Oracle服务才能使用TransactionScope。

The Oramts.dll file is not included as a default installation when you install the Oracle client connectivity software. I think you have to install Oracle Services for Microsoft Transaction Server to use TransactionScope.

这篇关于使用事务范围和查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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