2012-02-27 2 views
0

그래서 내 코드 보인다.는 OracleDate 객체 인스턴스화

그러나 testdate2는이 오류를 발생시킵니다.

[DllNotFoundException: Unable to load DLL 'OraOps11w.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)] 
    Oracle.DataAccess.Types.OpsDat.AllocValCtxFromData(Int32 year, Int32 month, Int32 day, Int32 hour, Int32 minute, Int32 second, OpoDatValCtx*& ctx) +0 
    Oracle.DataAccess.Types.OpoDatCtx..ctor(Int32 year, Int32 month, Int32 day, Int32 hour, Int32 minute, Int32 second) +190 
    Oracle.DataAccess.Types.OracleDate..ctor(Int32 year, Int32 month, Int32 day, Int32 hour, Int32 minute, Int32 second) +237 
    Oracle.DataAccess.Types.OracleDate..cctor() +64 

[TypeInitializationException: The type initializer for 'Oracle.DataAccess.Types.OracleDate' threw an exception.] 
    Oracle.DataAccess.Types.OracleDate..ctor(DateTime data) +23 
    OraDateTest._Default.Page_Load(Object sender, EventArgs e) in c:\users\jonesmi\documents\visual studio 2010\Projects\OraDateTest\OraDateTest\Default.aspx.cs:14 
    System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14 
    System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35 
    System.Web.UI.Control.OnLoad(EventArgs e) +91 
    System.Web.UI.Control.LoadRecursive() +74 
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207 

가 진정으로 'OraOps11w.dll'를 찾을 수 있다면, 나는 두 경우에 오류가 발생하지 않을까요? 내 DLL이 오래되었을 가능성이 있습니까?

+0

당신은 odp.net 11.2로 업그레이드하고 작동하는지 또는 당신이 현재 Xcopy를 ODP.NET와 함께 제공된 파일 msvcr71.dll을 & mfc71.dll을 할 수 있음을 확인하려고 시도 할 수 있습니다. –

+0

ODP.net 11.2를 사용하고 있습니다. 또한 msvcr71, 버전 7.10.3052.4, mfc71.dll, 버전 7.10.3077.0 있습니다. – duckmike

답변

0
Unzip all the JAR's in zip file of odt.net you downloaded 
Get all the files inside that you just unzipped: 
    oci.dll (renamed from 'oci.dll.dbl') 
    Oracle.DataAccess.dll 
    oraociicus11.dll 
    OraOps11w.dll 
    orannzsbb11.dll 
    oraocci11.dll 
    ociw32.dll (renamed from 'ociw32.dll.dbl') 
Copy all the dll files into the bin dir of your .net exe 
+0

나는 그 dll을 모두 내 .exe 폴더에 복사했지만 여전히 작동하지 않습니다. – duckmike

+0

프로젝트에서 참조를 제거하고 다시 추가하십시오. 위에서 언급 한 다른 파일과 동일한 bin 디렉토리에 Oracle.DataAccess.dll을 넣으십시오. –

+0

Nope. 아직도 작동하지 않습니다. – duckmike