. Net to access the Oracle database link: ORA-02041: client database did not begin a transaction problem. . Net to access the Oracle database link: ORA-02041: client database did not begin a transaction problem.
. When accessing the object with db_link in Oracle, it will throw an exception ORA-02041: client database did not begin a transaction means to set a transaction, however, the simple begintransaction does not seem to solve the problem. Code
Dgis_sp_mis_workflow uses an object in the database link.
(Update operations are not tested for read-only instances ):
Oraclecommand command =NewOraclecommand ();
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 =NewOracledataadapter ();
Datatable dttable =NewDatatable ();
ODA. selectcommand = command;
ODA. Fill (dttable );
Dbgrid1.datasource = dttable;