vs2010引用oci.dll时提示“a reference to 'D:\oracle\ora92\Bin\oci.dll' could not be added.No type libraries were found in the component.”,该怎么办呢~~请高人指点一二,谢谢。

解决方案 »

  1.   

    你是如何引用的oci.dll? 一般需要引入它的lib文件
      

  2.   

    就是用C#编程时不用system.data.oracleclient,而是直接调用oci,我在“网站-添加引用-浏览”里面找到Oracle的oci.dll结果vs给出上面的提示。因为是第一次用oci,所以具体用法也不清楚,希望各位前辈多多指教。如果是lib文件的话,该如何指定呢?
      

  3.   

    直接引用oci.dll,肯定不行。它里边定义了大量的内部数据结构,使用C#引用,很难转换。
    你还是老实地使用Oracle.net库吧。用起来很方便。
      

  4.   

    确实用Oracleclient类很方便,但微软在vs2010里威胁说“The types in System.Data.OracleClient are deprecated. The types are supported in version 4 of the .NET Framework but will be removed in a future release. Microsoft recommends that you use a third-party Oracle provider.The .NET Framework Data Provider for Oracle provides access to an Oracle database using the Oracle Call Interface (OCI) as provided by Oracle Client software. ”,言外之意就是让用户投奔OCI,这可要出人命了。
      

  5.   

    这只是说微软不再提供oracleclient.net,但是oracle公司自己有实现啊。
    你从Oracle官网上下载一个ODAC9207.exe或者Oracle.net安装一下就行。
    它叫odp.net. 用的是Oracle.DataAccess.dll (Oracle.DataAccess.Client)
    这个才是效率最高的实现。
      

  6.   

    多谢iihero前辈和各位的指教,已开始新的尝试。