FailedNo error information available: E_NOINTERFACE(0x80004002).

博客指出使用COM+自动事务时,用Access调用DTC会出现莫名其妙的错误代码,如E_NOINTERFACE(0x80004002),微软有相关kb文档。还给出了示例代码,包含HelloWorld函数及DrawMoneyFromA、DepostMoneyToB子过程,处理事务异常。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

用COM+ 的自动事务,必须操作的对象支持,用access 调用dtc,会有莫名其妙的错误代码

FailedNo error information available: E_NOINTERFACE(0x80004002).

关于这个问题,微软有一片kb

http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q221071& 

 

 <WebMethod(transactionOption:=EnterpriseServices.TransactionOption.RequiresNew)> _
    Public Function HelloWorld() As String
        Try
            ContextUtil.EnableCommit()

            DrawMoneyFromA(1000)
            DepostMoneyToB(1000)
            ContextUtil.SetComplete()
            Return "OK!"
        Catch ex As Exception
            ContextUtil.SetAbort()
            Return "Failed" + ex.Message
        End Try


    End Function


    Public Sub DrawMoneyFromA(ByVal amount As Long)
        '从 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.ExecuteNonQuery()

    End Sub

    Public Sub DepostMoneyToB(ByVal amount As Long)
        '从 B 加一定的钱
        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='B'", cnn)
        'Throw New Exception("ff")
        cmd.ExecuteNonQuery()

    End Sub

# [ 33.344784] rtl8723bs: acquire FW from file:rtlwifi/rtl8723bs_nic.bin cat > /tmp/wpa.conf <<EOF > network={ > ssid="Xiaomi_6E67" > psk="15022688" > key_mgmt=WPA-PSK > proto=RSN # 强制使用WPA2 > pairwise=CCMP # 强制AES加密 > group=CCMP > scan_ssid=1 # 扫描隐藏网络 > freq_list=2427 # 指定2.4GHz频段 > } > EOF # wpa_supplicant -d -Dnl80211 -iwlan0 -c/tmp/wpa.conf wpa_supplicant v2.10 random: Trying to read entropy from /dev/random Successfully initialized wpa_supplicant Initializing interface 'wlan0' conf '/tmp/wpa.conf' driver 'nl80211' ctrl_interface 'N/A' bridge 'N/A' Configuration file '/tmp/wpa.conf' -> '/tmp/wpa.conf' Reading configuration file '/tmp/wpa.conf' Priority group 0 id=0 ssid='Xiaomi_6E67' nl80211: Supported cipher 00-0f-ac:1 nl80211: Supported cipher 00-0f-ac:5 nl80211: Supported cipher 00-0f-ac:2 nl80211: Supported cipher 00-0f-ac:4 nl80211: Supported cipher 00-0f-ac:6 nl80211: Using driver-based off-channel TX nl80211: key_mgmt=0xd0f enc=0x10f auth=0x7 flags=0x800d0c0 rrm_flags=0x0 probe_resp_offloads=0x0 max_stations=0 max_remain_on_chan=5000 max_scan_ssids=9 nl80211: interface wlan0 in phy phy0 nl80211: Set mode ifindex 2 iftype 2 (STATION) nl80211: Subscribe to mgmt frames with non-AP handle 0x53cf78 nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x53cf78 match=0801 multicast=0 nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x53cf78 match=06 multicast=0 nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x53cf78 match=0a07 multicast=0 nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x53cf78 match=0a11 multicast=0 nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x53cf78 match=1101 multicast=0 nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x53cf78 match=1102 multicast=0 nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x53cf78 match=0505 multicast=0 nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x53cf78 match=0500 multicast=0 nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x53cf78 match=1301 multicast=0 nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x53cf78 match=1305 multicast=0 nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x53cf78 match=7e506f9a1a multicast=0 rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0 netlink: Operstate: ifindex=2 linkmode=1 (userspace-control), operstate=5 (IF_OPER_DORMANT) Add interface wlan0 to a new radio phy0 nl80211: Regulatory information - country=00 nl80211: 2402-2472 @ 40 MHz 20 mBm nl80211: 2457-2482 @ 20 MHz 20 mBm (no IR) nl80211: 2474-2494 @ 20 MHz 20 mBm (no OFDM) (no IR) nl80211: 5170-5250 @ 80 MHz 20 mBm (no IR) nl80211: 5250-5330 @ 80 MHz 20 mBm (DFS) (no IR) nl80211: 5490-5730 @ 160 MHz 20 mBm (DFS) (no IR) nl80211: 5735-5835 @ 80 MHz 20 mBm (no IR) nl80211: 57240-63720 @ 2160 MHz 0 mBm nl80211: Added 802.11b mode based on 802.11g information nl80211: Mode IEEE 802.11g: 2412 2417 2422 2427 2432 2437 2442 2447 2452 2457 2462 2467 2472 2484[DISABLED] nl80211: Mode IEEE 802.11b: 2412 2417 2422 2427 2432 2437 2442 2447 2452 2457 2462 2467 2472 2484[DISABLED] wlan0: Own MAC address: cc:b8:5e:f5:a6:86 wpa_driver_nl80211_set_key: ifindex=2 (wlan0) alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0 key_flag=0x10 nl80211: DEL_KEY broadcast key wpa_driver_nl80211_set_key: ifindex=2 (wlan0) alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0 key_flag=0x10 nl80211: DEL_KEY broadcast key wpa_driver_nl80211_set_key: ifindex=2 (wlan0) alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0 key_flag=0x10 nl80211: DEL_KEY broadcast key wpa_driver_nl80211_set_key: ifindex=2 (wlan0) alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0 key_flag=0x10 nl80211: DEL_KEY broadcast key wpa_driver_nl80211_set_key: ifindex=2 (wlan0) alg=0 addr=(nil) key_idx=4 set_tx=0 seq_len=0 key_len=0 key_flag=0x10 nl80211: DEL_KEY broadcast key wpa_driver_nl80211_set_key: ifindex=2 (wlan0) alg=0 addr=(nil) key_idx=5 set_tx=0 seq_len=0 key_len=0 key_flag=0x10 nl80211: DEL_KEY broadcast key wlan0: RSN: flushing PMKID list in the driver nl80211: Flush PMKIDs wlan0: Setting scan request: 0.100000 sec TDLS: TDLS operation not supported by driver TDLS: Driver uses internal link setup TDLS: Driver does not support TDLS channel switching wlan0: Added interface wlan0 wlan0: State: DISCONNECTED -> DISCONNECTED nl80211: Set wlan0 operstate 0->0 (DORMANT) netlink: Operstate: ifindex=2 linkmode=-1 (no change), operstate=5 (IF_OPER_DORMANT) nl80211: Skip set_supp_port(unauthorized) while not associated random: Got 20/20 bytes from /dev/random RTM_NEWLINK: ifi_index=2 ifname=wlan0 operstate=2 linkmode=1 ifi_family=0 ifi_flags=0x1003 ([UP]) wlan0: State: DISCONNECTED -> SCANNING Scan SSID - hexdump_ascii(len=11): 58 69 61 6f 6d 69 5f 36 45 36 37 Xiaomi_6E67 wlan0: Starting AP scan for wildcard SSID wlan0: Add radio work 'scan'@0x53f718 wlan0: First radio work item in the queue - schedule start immediately wlan0: Starting radio work 'scan'@0x53f718 after 0.000095 second wait wlan0: nl80211: scan request Scan requested (ret=0) - scan timeout 10 seconds nl80211: Drv Event 33 (NL80211_CMD_TRIGGER_SCAN) received for wlan0 wlan0: nl80211: Scan trigger wlan0: Event SCAN_STARTED (47) received wlan0: Own scan request started a scan in 0.000210 seconds RTM_NEWLINK: ifi_index=2 ifname=wlan0 wext ifi_family=0 ifi_flags=0x1003 ([UP]) nl80211: Drv Event 34 (NL80211_CMD_NEW_SCAN_RESULTS) received for wlan0 wlan0: nl80211: New scan results available nl80211: Scan probed for SSID 'Xiaomi_6E67' nl80211: Scan probed for SSID '' nl80211: Scan included frequencies: 2412 2417 2422 2427 2432 2437 2442 2447 2452 2457 2462 2467 2472 wlan0: Event SCAN_RESULTS (3) received wlan0: Scan completed in 1.536741 seconds nl80211: Received scan results (1 BSSes) wlan0: BSS: Start scan result update 1 wlan0: BSS: Add new id 0 BSSID cc:d8:43:81:b9:9e SSID 'Xiaomi_6E67' freq 2432 BSS: last_scan_res_used=1/32 wlan0: New scan results available (own=1 ext=0) wlan0: Radio work 'scan'@0x53f718 done in 1.541366 seconds wlan0: radio_work_free('scan'@0x53f718): num_active_works --> 0 wlan0: Selecting BSS from priority group 0 wlan0: 0: cc:d8:43:81:b9:9e ssid='Xiaomi_6E67' wpa_ie_len=0 rsn_ie_len=20 caps=0x1431 level=-66 freq=2432 wps wlan0: selected based on RSN IE wlan0: skip - frequency not allowed wlan0: No suitable network found wlan0: Setting scan request: 5.000000 sec Scan SSID - hexdump_ascii(len=11): 58 69 61 6f 6d 69 5f 36 45 36 37 Xiaomi_6E67 wlan0: Starting AP scan for wildcard SSID wlan0: Add radio work 'scan'@0x5404d8 wlan0: First radio work item in the queue - schedule start immediately wlan0: Starting radio work 'scan'@0x5404d8 after 0.000087 second wait wlan0: nl80211: scan request Scan requested (ret=0) - scan timeout 30 seconds nl80211: Drv Event 33 (NL80211_CMD_TRIGGER_SCAN) received for wlan0 wlan0: nl80211: Scan trigger wlan0: Event SCAN_STARTED (47) received wlan0: Own scan request started a scan in 0.000248 seconds RTM_NEWLINK: ifi_index=2 ifname=wlan0 wext ifi_family=0 ifi_flags=0x1003 ([UP]) nl80211: Drv Event 34 (NL80211_CMD_NEW_SCAN_RESULTS) received for wlan0 wlan0: nl80211: New scan results available nl80211: Scan probed for SSID 'Xiaomi_6E67' nl80211: Scan probed for SSID '' nl80211: Scan included frequencies: 2412 2417 2422 2427 2432 2437 2442 2447 2452 2457 2462 2467 2472 wlan0: Event SCAN_RESULTS (3) received wlan0: Scan completed in 1.761073 seconds nl80211: Received scan results (1 BSSes) wlan0: BSS: Start scan result update 2 BSS: last_scan_res_used=1/32 wlan0: New scan results available (own=1 ext=0) wlan0: Radio work 'scan'@0x5404d8 done in 2.204339 seconds wlan0: radio_work_free('scan'@0x5404d8): num_active_works --> 0 wlan0: Selecting BSS from priority group 0 wlan0: 0: cc:d8:43:81:b9:9e ssid='Xiaomi_6E67' wpa_ie_len=0 rsn_ie_len=20 caps=0x1431 level=-66 freq=2432 wps wlan0: selected based on RSN IE wlan0: skip - frequency not allowed wlan0: No suitable network found wlan0: Setting scan request: 5.000000 sec journalctl -f | grep -E 'wpa_supplicant|rtl8723bs' Scan SSID - hexdump_ascii(len=11): 58 69 61 6f 6d 69 5f 36 45 36 37 Xiaomi_6E67 wlan0: Starting AP scan for wildcard SSID wlan0: Add radio work 'scan'@0x541ff0 wlan0: First radio work item in the queue - schedule start immediately wlan0: Starting radio work 'scan'@0x541ff0 after 0.000076 second wait wlan0: nl80211: scan request Scan requested (ret=0) - scan timeout 30 seconds
最新发布
06-09
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值