Stack trace:
bij Specificaties.OracleUser.DataLayer.StoredProcedureCallerClasses.ActionProcedures.ApaoBomExplode(String aspartno, Int16 anmultilevel, Decimal& returnValue, Int64& anuniqueid) in D:\\Projecten\\Ontwikkeling\\Specificaties\\OracleUserDataLayer\\StoredProcedureCallerClasses\\ActionProcedures.cs:regel 64
Exception message:
The specified cast is invalid
The code that calls the LLBLGen code:
decimal procesStatus = 0;
long bomReferentienummer = 0;
OracleUser.DataLayer.StoredProcedureCallerClasses.ActionProcedures.ApaoBomExplode(procesData.Artikelnummer, procesData.ExplosionNiveau, ref procesStatus, ref bomReferentienummer);
The generated code: (we're not doing anything that has to do with a detonation of any kind, I promise :-))
The line with ** is where the exception occurs.
public static int ApaoBomExplode(System.String aspartno, System.Int16 anmultilevel, ref System.Decimal returnValue, ref System.Int64 anuniqueid)
{
// create parameters
OracleParameter[] parameters = new OracleParameter[4];
parameters[0] = ParameterCreator.Create("RETURN_VALUE", OracleDbType.Decimal, ParameterDirection.ReturnValue, 0, 22, 0, returnValue);
parameters[1] = ParameterCreator.Create("ASPARTNO", OracleDbType.Varchar2, ParameterDirection.Input, 4000, 0, 0, aspartno);
parameters[2] = ParameterCreator.Create("ANMULTILEVEL", OracleDbType.Decimal, ParameterDirection.Input, 0, 1, 0, anmultilevel);
parameters[3] = ParameterCreator.Create("ANUNIQUEID", OracleDbType.Decimal, ParameterDirection.Output, 0, 13, 0, anuniqueid);
// Call the stored proc.
int toReturn = DbUtils.CallActionStoredProcedure("INTERSPC.APAO_BOM.EXPLODE", parameters, null);
if((ValueConverter.Convert(parameters[0])!=null) && (ValueConverter.Convert(parameters[0])!=System.DBNull.Value))
{
returnValue = (System.Decimal)ValueConverter.Convert(parameters[0]);
}
if((ValueConverter.Convert(parameters[3])!=null) && (ValueConverter.Convert(parameters[3])!=System.DBNull.Value))
{
**anuniqueid = (System.Int64)ValueConverter.Convert(parameters[3]); }
for(int i=0;i<4;i++)
{
if(parameters[i] != null)
{
parameters[i].Dispose();
}
}
return toReturn;
}