Failedno Error Information Available: E

xiaoxiao2021-03-06  59

With COM automatic transaction, the object support must be operated, use Access to call DTC, there will be inexplicable error code

Failedno Error Information Available: E_NOINTERFACE (0x80004002).

About this problem, Microsoft has a KB

http://support.microsoft.com/default.aspx?scid=kb;n-us;q221071&

_ Public Function HelloWorld () AS String Try ContextUtil.NableCommit ()

DrawMoneyfroma (1000) DepostMoneyTob (1000) ContextUtil.setComplete () Return "OK!" Catch Exception ContextUtil.Setabort () Return "failed" EX.MESSAGE END TRY

END FUNCTION

Public Sub DrawMoneyFromA (ByVal amount As Long) 'to extract some money from the A Dim cnn As New OleDb.OleDbConnection (Me.OleDbConnection1.ConnectionString) cnn.Open () Dim cmd As New OleDb.OleDbCommand ( "Update bank set amount = Amount - "& Amount &" Where BankAccount = 'a' ", cnn) cmd.executenon query ()

End Sub

Public Sub DepostMoneyToB (ByVal amount As Long) 'B plus some money from Dim cnn As New OleDb.OleDbConnection (Me.OleDbConnection1.ConnectionString) cnn.Open () Dim cmd As New OleDb.OleDbCommand ( "Update bank set amount = amount "& Amount &" Where BankAcount = 'b' ", CNN) 'Throw New Exception (" ff ") cmd.executenonquery ()

End Sub

转载请注明原文地址:https://www.9cbs.com/read-118227.html

New Post(0)