私はMicrosoft ODBCをOracle用に使用し、TransactionScopeで分散トランザクションを処理しますが、コードでエラーが発生します:エラー[HYC00] [ORACLE] [ODBC]オプションが実装されていません。 vb.net。 、なぜ感謝を私に言うことができるMicrosoft ODBC for TransactionScope
sub Main()
dim strConn1 as string = "Driver={Microsoft ODBC for Oracle};Server=server1;UID=user1;PWD=pwd1;"
dim strConn2 as string = "Driver={Microsoft ODBC for Oracle};Server=server2;UID=user2;PWD=pwd2;"
try
using scope as new TransactionScope()
using conn1 as new OdbcConnection(strConn1)
conn1.Open() 'always throws error here
dim command1 as new OdbcCommand(strSQL1)
command1.ExecuteNonQuery()
using conn2 as new OdbcConnection(strConn2)
dim command2 as new OdbcCommand(strSQL2)
command2.ExecuteNonQuery()
end using
end using
scope.Complete()
end using
catch
end try
end sub
:
は、ここに私のコードです。
こんにちはAmRan、私は自分のコードを改訂しました。ありがとう – viscroad