.NET中访问Oracle数据库链接:ORA-02041: client database did not begin a transaction 问题的处理。
2005-12-17 20:50
645 查看
.NET中访问Oracle数据库链接:ORA-02041: client database did not begin a transaction 问题的处理。
.NET中访问Oracle数据库链接:ORA-02041: client database did not begin a transaction 问题的处理。document.title=".NET中访问Oracle数据库链接:ORA-02041: client database did not begin a transaction 问题的处理。 - "+document.title
.NET中访问Oracle中带有DB_LINK时对象时,会抛出一下异常
ORA-02041: client database did not begin a transaction
意思是要设置一个事务,但是简单的BeginTransaction
好像并不能解决问题,以下是解决的代码
其中 DGIS_SP_MIS_WORKFLOW 中使用了一个数据库链接中的对象
(针对只读情况,更新操作未作试验):
OracleCommand command = new OracleCommand();
oracleConnection1.Open();
command.Connection = oracleConnection1;
command.Transaction = oracleConnection1.BeginTransaction(IsolationLevel.ReadCommitted);
command.CommandText = "SET TRANSACTION READ ONLY";
OracleDataReader oraDr = command.ExecuteReader();
command.CommandText = "select * from DGIS_SP_MIS_WORKFLOW";
OracleDataAdapter oda = new OracleDataAdapter();
DataTable dtTable = new DataTable();
oda.SelectCommand = command;
oda.Fill(dtTable);
DBGrid1.DataSource = dtTable;
相关文章推荐
- .NET中访问Oracle数据库链接:ORA-02041: client database did not begin a transaction 问题的处理。
- ORA-02041: client database did not begin a transaction
- .Net下使用System.Data.OracleClient出现“ORA-12154问题“TNS: 无法处理服务名”问题的解决
- .Net下使用System.Data.OracleClient出现“ORA-12154问题“TNS: 无法处理服务名”问题的解决
- RF:DatabaseLibrary类库访问Oracle数据库出现ORA-00911错误
- 在64位机上PLSQL连oracle11g问题:SQL*Net not properly installed和ORA-12154:TNS:无法处理服务名
- 访问Storm ui界面,出现org.apache.storm.utils.NimbusLeaderNotFoundException: Could not find leader nimbus from seed hosts ["master"]. Did you specify a valid list of nimbus hosts for confi的问题解决(图文详解)
- 对于php实现soap代理的一个常见问题:Class 'SoapClient' not found in PHP的处理方法
- 链接库加载,“”(*.exe 中)处有未经处理的异常: 0xC0000005: 写入位置 0x40B9CA00 时发生访问冲突”的问题所在
- [Dataguard]ORA-16191: Primary log shipping client not logged on standby问题解决
- ORA-14450: 试图访问已经在使用的事务处理临时表,根据网上文章提供的方法,问题是解决了
- 问题:Unique约束与ORA-08177: 无法连续访问此事务处理
- 开发随笔-处理.net 多线程访问数据库问题
- Oracle BIEE 链接oracle 数据库的问题,报:Check if 'Oracle OCI 10G' database client is installed
- .NET 对ORA-01000问题的正确处理
- SharePoint 2010用“localhost”方式访问网站,File not found问题处理方式
- Data Guard 奇葩的 ORA-16191: Primary log shipping client not logged on standby 问题
- Oracle Data Guard ORA-16086: standby database does not contain available standby 处理方法
- js使用 soapclient.js 访问webservice遇到问题" field SOAPAction is not allowed by Access-Control"
- Oracle数据库 ORA-600 [13013]故障处理 碰到同样问题