The OracleParameterCollection only accepts non-null OracleParameter type objects, not OracleParameter objects
I got the following error :
The OracleParameterCollection only accepts non-null OracleParameter type objects, not OracleParameter objects.
the code is something like this:
System.Data.Common.D开发者_如何转开发bCommand dbCommand = Db.GetStoredProcCommand("ARCHIVE.FSP_STACKHOLDERSBYCREDENTIALS");
dbCommand.Parameters.Add(new OracleParameter("P_Password", password));
My oracle DB is : 11gR2 x64 running on windows 7(x64) My project is : .Net 4.0/Visual studio 2010 (build:any cpu) IIS : 7.5 / app pool:default(asp.net4.0/integrated) My ODP.Net comes from : ODAC112021Xcopy_32bit
NOTE : I cannot change my Oracle.DataAccess.dll to x64 version becuase the project depends on some old dlls(it is because of changing to use the Oracle.DataAccess.dll x64 version, needs to chnage the PlatformTarget to x64 too)
so what should I do? thanks in advance
The problem was on my own! I configed Db.GetStoredProcCommand() function improperly. which cause to create System.Data.Oracle.OracleCommand which comes from microsoft provider instead of oracle client provider. But the text of exception was really misleading!
精彩评论