类型 [Oracle.DataAccess.Client.OracleBulkCopy] 在哪里?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4912944/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Where is type [Oracle.DataAccess.Client.OracleBulkCopy]?
提问by bernd_k
I tried
我试过
[System.Reflection.Assembly]::LoadWithPartialName("Oracle.DataAccess")
$bulkCopy = new-object Oracle.DataAccess.Client.OracleBulkCopy $oraClientConnString
and got
并得到
GAC Version Location
--- ------- --------
True v2.0.50727 C:\Windows\assembly\GAC_32\Oracle.DataAccess.111.6.0__89b483f429c47342\Oracle.DataAccess.dll
New-Object : Cannot find type [Oracle.DataAccess.Client.OracleBulkCopy]: make sure the assembly containing this type is loaded.
At line:3 char:23
+ $bulkCopy = new-object <<<< Oracle.DataAccess.Client.OracleBulkCopy $oraClientConnString
+ CategoryInfo : InvalidType: (:) [New-Object], PSArgumentException
+ FullyQualifiedErrorId : TypeNotFound,Microsoft.PowerShell.Commands.NewObjectCommand
What is missing?
有什么不见了?
回答by x0n
Maybe you're using an older version of Oracle? I see documentation for this class on Oracle for 11g or later.
也许您使用的是旧版本的 Oracle?我在 11g 或更高版本的 Oracle 上看到了此类的文档。
http://download.oracle.com/docs/html/E10927_01/OracleBulkCopyClass.htm
http://download.oracle.com/docs/html/E10927_01/OracleBulkCopyClass.htm
Oracle.DataClient.dll is the containing assembly in the above documentation.
Oracle.DataClient.dll 是上述文档中的包含程序集。
Try this:
尝试这个:
ps> $a = [reflection.assembly]::loadwithpartialname("oracle.dataaccess")
ps> $a.getexportedtypes() | where { $_.fullname -like "*bulk*" }
-Oisin
-Oisin