GVKun编程网logo

Windows10 中注册 regsvr32 xxx.ocx 报错 but the call to DIIRegisterServer failed with error code 0x80040200

2

关于Windows10中注册regsvr32xxx.ocx报错butthecalltoDIIRegisterServerfailedwitherrorcode0x80040200的问题就给大家分享到这

关于Windows10 中注册 regsvr32 xxx.ocx 报错 but the call to DIIRegisterServer failed with error code 0x80040200的问题就给大家分享到这里,感谢你花时间阅读本站内容,更多关于04: Job for docker.service failed because the control process exited with error code 解决、10.1 oracle alert.log中'Process Q000 Started Up But Failed With Error = 20'、ajax 报错 400 (Failed to load resource: the server responded with a status of 400 (Bad Request))、Cannot obtain the required interface ("IID_IDBCreateCommand") from OLE DB provider "OraOLEDB.Oracle" for linked server xxxx等相关知识的信息别忘了在本站进行查找喔。

本文目录一览:

Windows10 中注册 regsvr32 xxx.ocx 报错 but the call to DIIRegisterServer failed with error code 0x80040200

Windows10 中注册 regsvr32 xxx.ocx 报错 but the call to DIIRegisterServer failed with error code 0x80040200

网站中有读取居民身份证的机器,需要安装一些注册 activeX 控件
然后进入指定目录下执行以下命令
regsvr32 xxx.ocx
报了个错:

but the call to DIIRegisterServer failed with error code 0x80040200

 

度娘了一下,发现原因很简单,需要用管理员身份运行

于是控制面板中敲出 cmd,右击 Run as administrator

这次成功了

 

04: Job for docker.service failed because the control process exited with error code 解决

04: Job for docker.service failed because the control process exited with error code 解决

Job for docker.service failed because the control process exited with error code 解决

 

Job for docker.service failed because the control process exited with error code

这个一般是由于 /etc/docker/daemon.json 里面配置有误

正确配置例子

[root@k8s129 v2]# cat /etc/docker/daemon.json
{
"registry-mirrors": ["https://aeckruos.mirror.aliyuncs.com"],
"insecure-registries": ["192.168.6.129:5000"]
}

 

逗号不能漏

 

切记切记。。。。。每行是有一个,号作为分隔符。

 

 

10.1 oracle alert.log中'Process Q000 Started Up But Failed With Error = 20'

10.1 oracle alert.log中'Process Q000 Started Up But Failed With Error = 20'

老的测试环境。日志报''Process Q000 Started Up But Failed With Error = 20''错误。无法起库。

oracle 10.1.0.3.0 aix 5.3单机。
经查询,是processes参数设置过低引起。当前值为300,改正为800即可。

ajax 报错 400 (Failed to load resource: the server responded with a status of 400 (Bad Request))

ajax 报错 400 (Failed to load resource: the server responded with a status of 400 (Bad Request))

Failed to load resource: the server responded with a status of 400 (Bad Request)

http://localhost:8081/ezsonar/npm/appportmanage/saveEditAppPortManage


报错代码为400的错误的原因:基本上都是前台传的数据格式不正确造成的,但是这个格式如何不正确,就得看如何理解这个数据到底是怎么在传的啦。


写下我的代码报错400,的原因:

前台代码:

	$.ajax({
		url: SUBSYstem_APP_NAME + "appportmanage/saveEditAppPortManage",type: "post",contentType: "application/json; charset=utf-8",data: JSON.stringify(data),dataType: "json",success: function (data) {
			if (data.success) {
				GMS.success(data.msg);
			} else {
				GMS.error(data.msg,3000);
			}
		}
	});

首先是,前台封装的数据对象的属性什么的,都是和后台的java的model的属性是一致的,这个不是问题的原因。不用担心。

然后ajax的type和各种参数都是和后台可以 对的上的,也不是问题的原因。


后台的代码:

	@RequestMapping(value = "/saveEditAppPortManage")
	public @ResponseBody JsonResult saveEditRenameDetail (@RequestBody Appportmanage detail) {
		LOG.debug("---------------AppportmanageController:saveEditAppPortManage---------------");
		LOG.debug("---------------detail:" + detail + "---------------");

		return appportmanageService.saveEditAppPortManage(detail);
	}

其次是,前后台的url也是对上的,model的各个属性也是对上的。然后呢,spring mvc 的注解标签也是没问题的。


本来代码是OK的。还是上面的代码,程序是可以正常工作的,跑起来没问题的。


但是我做了如下修改:

修改了数据的model:原来的 model java 文件就是一些属性s和简单的getter和setter,然后我因业务需求,给原来的model添加了一条属性,当然对应的getter和setter也是添加的,然后又因为需求我添加了一个带参数的构造函数,因为我在其他地方要new这个model的对象。


然后,,,

问题就出现了。

就报 400 的错误码了


刚刚开始,我以为是属性的添加的问题,但是检查之后,发现不是这个问题。


问题出现在,model java 文件的构造函数上。

解决方法:给model java 文件再添加一个不带参数的构造函数。具体解释在下面。

至于原因,就得看怎么理解spring mvc是怎么在前后台之间传递参数了。


原来我没加带参构造函数的时候,每个model都会默认自带个不带参数的构造函数,然后前台的数据格式封装 和后台的model的属性只要对的上,然后spring mvc在后台 就可以自己根据model,自己去把前台传过来的数据,对应的给装进到@RequestBody Appportmanage detail,这个参数里面,这个实现的前提是,你的model有默认构造函数,不带参数的,然后系统自己去new一个对象,然后自己去把数据给装进去。然后你就可以用了。


因为,我更新了model 的构造函数,若是你不写不带参数的构造函数的话,那么原来model自带的不带参构造函数就木有了,然后到controler层的时候,就是在获得前台的数据,自己去装数据的时候,他不会根据你的带参构造函数去new个你要的model对象出来,so,问题就这么出现了。


然后,遇到今天的这个错误之后,就知道前后台的数据具体是怎么在对应的了。原来我只是以为,只要前后的数据模型一致就可以 了。


现在,又知道了,哦,还和构造函数有关系呢。


我为什么要把空构造函数 给删除了,因为ide提示说这个构造函数没用,然后我就删除了。然后我就悲剧了。哦,西特 !!!

Cannot obtain the required interface (

Cannot obtain the required interface ("IID_IDBCreateCommand") from OLE DB provider "OraOLEDB.Oracle" for linked server xxxx

 

今天遇到了一个关于Linked Server查询报错的案例,链接服务器链接ORACLE数据库,测试没有错误,但是执行脚本的时候,报如下错误:

 

clip_image001

 

 

Msg 7399,Level 16,State 1,Line 1

The OLE DB provider "OraOLEDB.Oracle" for Linked Server "xxxx" reported an error. Access denied.

Msg 7301,State 2,Line 1

Cannot obtain the required interface ("IID_IDBCreateCommand") from OLE DB provider "OraOLEDB.Oracle" for Linked Server "xxxx".

 

 

其实以前遇到过类似的案例,但是这次案例发生在sql Server 2012 (SP4) (KB4018073) - 11.0.7001.0 (X64)下,Linked Server使用 Oracle Provider for OLE DB驱动,跟之前遇到的案例Cannot create an instance of OLE DB provider "OraOLEDB.Oracle" for linked server "xxxxxxx".有一些区别。解决方案相同,需要在Oracle Provider for OLE DB驱动的选项里面勾选Allow inporcess",或者修改注册表,具体参考下面Metalink官方文档。(另外,今天还遇到了很奇葩的事情,设置后,sql 语句在其他数据库执行OK,但是在master库下面就一直报这个错误,但是一段时间后又OK了。十分奇怪,暂时不清楚具体原因)

 

 

clip_image002

 

 

 

MetalinkUsing Oracle OLE DB Provider and MS sql Server To Acccess Oracle Database Raise Errors 7399 And 7301 (文档 ID 396648.1)的详细介绍

 

 

SYMPTOMS

You are unable to connect to the Oracle database when using Microsoft sql Server‘s Linked Server and the Oracle Provider for OLE DB and receive errors messages like

 

Msg 7399,Line 1

The OLE DB provider "OraOLEDB.Oracle" for Linked Server "TEST" reported an error. The provider reported an unexpected catastrophic failure.

Msg 7301,Line 1

Cannot obtain the required interface ("IID_IDBCreateCommand") from OLE DB provider "OraOLEDB.Oracle" for Linked Server "TEST".

 

CAUSE

 

The Oracle Provider for OLE DB has been configured to run out-of-process (in a separate process than the sql Server process,typically DLLHOST.EXE) but it is mandatory to run the Oracle Provider for OLE DB as in-process to function properly with sql Server.

 

SOLUTION

 

Please apply solution from

Note:333327.1 Error "Could not execute query against OLE DB provider ‘OraOLEDB.Oracle‘" when Querying Against an Oracle Database using Microsoft sql Server Linked Server and the Oracle Provider for OLE DB

which describes the same problem but with different symptoms.

 

REFERENCES

NOTE:333327.1 - Error "Could not execute query against OLE DB provider ‘OraOLEDB.Oracle‘" when Querying Against an Oracle Database using Microsoft sql Server Linked Server and the Oracle Provider for OLE DB

 

 

 

另外,关于文档333327.1 ——Error "Could not execute query against OLE DB provider ‘OraOLEDB.Oracle‘" when Querying Against an Oracle Database using Microsoft sql Server Linked Server and the Oracle Provider for OLE DB (文档 ID 333327.1)的具体内容如下:

 

APPLIES TO: Oracle Provider for OLE DB - Version 10.2.0.1 and later
Microsoft Windows (32-bit)

***Checked for relevance on 10-Oct-2016*** 

SYMPTOMS You are unable to connect to the Oracle database when using Microsoft sql Server‘s Linked Server and the Oracle Provider for OLE DB. When issuing the following query from Microsoft‘s sql Query Analyzer  

SELECT * FROM DEV..SCott.EMP
You receive the following error

Server: Msg 7320,Line 1
  Could not execute query against OLE DB provider ‘OraOLEDB.Oracle‘.
  OLE DB error trace [OLE/DB Provider ‘OraOLEDB.Oracle‘ ICommandText::Execute returned 0x80040155].
 

If you change the query so that it will not return any rows it runs successfully

SELECT * FROM DEV..SCott.EMP where 1=0
CAUSE The Oracle Provider for OLE DB has been configured to run out-of-process (in a separate process than the sql Server process,typically DLLHOST.EXE).  The Oracle Provider for OLE DB must run in-process to function properly with sql Server.

By sql*Net tracing the failing query you can look at the TNS information inside of a sql*Net trace you can see the difference between a provider running IN and OUT of process:

  
In-Process Trace:

(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=gbednars-pc)(PORT=1521)))
(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl.rmmslang.us.oracle.com)
(CID=(PROGRAM=C:\PROGRA~1\MI6841~1\MSsql\binn\sqlservr.exe)(HOST=GBednARS-PC)
(USER=SYstem))))
  Out-Of-Process Trace:

(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=gbednars-pc)(PORT=1521)))
(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl.rmmslang.us.oracle.com)
(CID=(PROGRAM=C:\WINDOWS\System32\DllHost.exe)(HOST=GBednARS-PC)(USER=SYstem))))
In the In-Process trace the TNS information shows us that the Oracle Provider for OLE DB is running under the sqlservr.exe process.  In the Out-Of-Processtrace we see that the same provider is running under the DllHost.exe process.  DllHost is used as a surrogate process in place of sql Server to host out-of-process executions and clearly shows us that the Oracle OLE DB provider has been configured this way.

SOLUTION
  1. Open the registry and check the value of the AllowInProcess key being used by the Oracle Provider for OLE DB
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSsqlServer\Providers\OraOLEDB.Oracle
    
         AllowInProcess     REG_DWORD     0x00000000 (0)
  2. If the AllowInProcess key has been set to a value of 0 then it is configured to run out-of-process.  Change the value from 0 to 1 or if the key does not exist,create it as a DWORD with a value of 1.  The value 1 is also the default setting signifying in-process.
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSsqlServer\Providers\OraOLEDB.Oracle
    
         AllowInProcess     REG_DWORD     0x00000001 (1)
    
    OR
    
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft sql Server\MSsql.1\Providers\OraOLEDB.Oracle
         AllowInProcess     REG_DWORD     0x00000001 (1)        
            
NOTE:  Microsoft states that the out-of-process setting AllowInProcess=0,is not to be used with any provider other than sqlOLEDB (Microsoft‘s OLEDB Provider for sql Server).  See the following link for more information:

  Microsoft KNowledge Base Article ID 833388
       
You cannot create out-of-process providers with MDAC OLE DB components

Additionally,the Oracle Provider for OLE DB Developer‘s Guide states that the Oracle Provider for OLE DB (OraOLEDB) is an in-process server.

 

 

 

 

参考资料

 

Using Oracle OLE DB Provider and MS sql Server To Acccess Oracle Database Raise Errors 7399 And 7301 (文档 ID 396648.1)

Error "Could not execute query against OLE DB provider ‘OraOLEDB.Oracle‘" when Querying Against an Oracle Database using Microsoft sql Server Linked Server and the Oracle Provider for OLE DB (文档 ID 333327.1)

今天关于Windows10 中注册 regsvr32 xxx.ocx 报错 but the call to DIIRegisterServer failed with error code 0x80040200的介绍到此结束,谢谢您的阅读,有关04: Job for docker.service failed because the control process exited with error code 解决、10.1 oracle alert.log中'Process Q000 Started Up But Failed With Error = 20'、ajax 报错 400 (Failed to load resource: the server responded with a status of 400 (Bad Request))、Cannot obtain the required interface ("IID_IDBCreateCommand") from OLE DB provider "OraOLEDB.Oracle" for linked server xxxx等更多相关知识的信息可以在本站进行查询。

本文标签: