Oracle.ManagedDataAccess.Client.OracleException: ORA-01008: not all variables bound

GeneBe
GeneBe used Ask the Experts™
on
I have checked my code and it seems right. I don't know what I am missing.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

 Exception Details: Oracle.ManagedDataAccess.Client.OracleException: ORA-01008: not all variables bound

Source Error:
Line 199:                            connection.Open();
Line 200:                        }
Line 201:                        dataAdapter.Fill(result);
Line 202:                        AuditCommand(command, 0);
Line 203:                        return result;
 
 Source File:  F:\Jobs\phc.standard\Data\DBHelper_ExecuteCommand.cs    Line:  201

Stack Trace:
[OracleException (0x80004005): ORA-01008: not all variables bound]
   OracleInternal.ServiceObjects.OracleConnectionImpl.VerifyExecution(Int32& cursorId, Boolean bThrowArrayBindRelatedErrors, SqlStatementType sqlStatementType, Int32 arrayBindCount, OracleException& exceptionForArrayBindDML, Boolean& hasMoreRowsInDB, Boolean bFirstIterationDone) +650
   OracleInternal.ServiceObjects.OracleCommandImpl.ExecuteReader(String commandText, OracleParameterCollection paramColl, CommandType commandType, OracleConnectionImpl connectionImpl, OracleDataReaderImpl& rdrImpl, Int32 longFetchSize, Int64 clientInitialLOBFS, OracleDependencyImpl orclDependencyImpl, Int64[] scnForExecution, Int64[]& scnFromExecution, OracleParameterCollection& bindByPositionParamColl, Boolean& bBindParamPresent, Int64& internalInitialLOBFS, OracleException& exceptionForArrayBindDML, OracleConnection connection, OracleLogicalTransaction& oracleLogicalTransaction, IEnumerable`1 adrianParsedStmt, Boolean isDescribeOnly, Boolean isFromEF) +14661
   Oracle.ManagedDataAccess.Client.OracleCommand.ExecuteReader(Boolean requery, Boolean fillRequest, CommandBehavior behavior) +3246
   Oracle.ManagedDataAccess.Client.OracleDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +373
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +88
   PHC.Standard.Data.DBHelper`8.ExecuteCommand(Command command, Transaction transaction, Parameter[] parameters) in F:\Jobs\phc.standard\Data\DBHelper_ExecuteCommand.cs:201

[ExecuteCommandException: PHC.Standard.Data.DBHelper`8+ExecuteCommandException Command : '
         
            SELECT IMAGE_RECNBR, ALT_REF_ID, ALT_REF_ID_WHO, ALT_ID_WHO, OP_NBR,
              TRANSCODE, VOID, YMDEND, YMDTRANS, YMDEFF, CHECKSUM_VALUE
            FROM AMIOWN.ALT_IDENTIFIER
            WHERE ALT_REF_ID LIKE RPAD(:alt_ref_type,2)
              || :alt_ref_prov
              || '%'
            AND ALT_ID_WHO LIKE RPAD(:alt_ref_type,2)
              || RPAD(:alt_id_type,4)
              || :alt_id_who
              || '%'
            AND RTRIM(VOID) IS NULL
            and (:ymdeff between ymdeff and ymdend
               or :ymdend between ymdeff and ymdend)
           
        ' , Parameters : '(String):alt_ref_type = 'P ', (String):alt_ref_prov = '341933852', (String):alt_id_type = 'SP', (String):alt_id_who = '1134221773', (Int32):ymdeff = 20191123, (Int32):ymdend = 99991231']
   PHC.Standard.Data.DBHelper`8.ExecuteCommand(Command command, Transaction transaction, Parameter[] parameters) in F:\Jobs\phc.standard\Data\DBHelper_ExecuteCommand.cs:207
   PHC.Standard.Data.DBHelper`8.ExecuteCommand(Command command, Connection connection, Parameter[] parameters) in F:\Jobs\phc.standard\Data\DBHelper_ExecuteCommand.cs:126
   PHC.Standard.Data.DBHelper`8.ExecuteCommand(Command command, ConnectionBuilder connectionStringBuilder, Parameter[] parameters) in F:\Jobs\phc.standard\Data\DBHelper_ExecuteCommand.cs:85
   PHC.Standard.Data.DBHelper`8.ExecuteCommand(Command command, Parameter[] parameters) in F:\Jobs\phc.standard\Data\DBHelper_ExecuteCommand.cs:67
   PHC.Standard.Data.DBHelper`8.ExecuteCommand(Object[] args) in F:\Jobs\phc.standard\Data\DBHelper.cs:371
   DataAccess.LookupAltIdentifierSpan(String alt_ref_type, String alt_ref_prov, String alt_id_type, String alt_id_who, Int32 ymdeff, Int32 ymdend) in f:\Jobs\crosswalkmaintenance\Web\App_Code\DataAccess.cs:153
   NPICrossWalkMaintenance.Web.NPIUpdate.btnInsert_Click(Object sender, EventArgs e) in f:\Jobs\crosswalkmaintenance\Web\NPIUpdate.aspx.cs:376
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9782310
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +204
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +12
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +15
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1639
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Author

Commented:
update function uses the same code and it works.
Eduard GherguArchitect - Coder - Mentor

Commented:
Hi,

Can be that is any concurrent access problems?
Most Valuable Expert 2012
Distinguished Expert 2018

Commented:
I suggested you do away with DBHelper.  What happened to that?

We would need to see the actual code to have any idea what might be causing the error.

We need to see how you set up the command and parameters.
Commented:
BindByName = true;

Thank yuh everyone!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial