I've stepped through the code and it looks like the difference is related to how sp's are currently called
I'm using the following call to test the two methods below:
UspBank2Select(-1,-1,null,null, new DataAccessAdapter());
Both sections of code were taken from the RetrievalProcedure definitions for the sp. The second section of code (LL 3.5 code) was slightly modified to return a dataset.
************Good Result -- LL v2*******************************************
//default passed -- the pnvBankName and pnvBankAcronym are passed as "default"
public static DataSet UspBank2Select(System.Decimal pnBankID, System.Int32 piResellerID, System.String pnvBankName, System.String pnvBankAcronym, DataAccessAdapter adapter)
{
SqlParameter[] parameters = new SqlParameter[4];
parameters[0] = new SqlParameter("@pnBankID", SqlDbType.Decimal, 0, ParameterDirection.Input, true, 18, 0, "", DataRowVersion.Current, pnBankID);
parameters[1] = new SqlParameter("@piResellerID", SqlDbType.Int, 0, ParameterDirection.Input, true, 10, 0, "", DataRowVersion.Current, piResellerID);
parameters[2] = new SqlParameter("@pnvBankName", SqlDbType.NVarChar, 50, ParameterDirection.Input, true, 0, 0, "", DataRowVersion.Current, pnvBankName);
parameters[3] = new SqlParameter("@pnvBankAcronym", SqlDbType.NVarChar, 50, ParameterDirection.Input, true, 0, 0, "", DataRowVersion.Current, pnvBankAcronym);
DataSet toReturn = new DataSet("UspBank2Select");
bool hasSucceeded = adapter.CallRetrievalStoredProcedure("[ValidbankDev].[dbo].[uspBank2Select]", parameters, toReturn);
return toReturn;
}
************END Good Result -- LL v2****************************************
//the result of this going to the DB is
exec [dbo].[uspBank2Select] @pnBankID=-1,@piResellerID=-1,@pnvBankName=default,@pnvBankAcronym=default
************Sad Result -- LL v3.5*******************************************
//default not passed -- the pnvBankName and pnvBankAcronym are passed as a null
private static DataSet UspBank2Select2(IDataAccessCore dataAccessProvider, System.Decimal pnBankID, System.Int32 piResellerID, System.String pnvBankName, System.String pnvBankAcronym)
{
StoredProcedureCall c = new StoredProcedureCall(dataAccessProvider, @"[ValidbankDev].[dbo].[uspBank2Select]", "UspBank2Select")
.AddParameter("@pnBankID", "Decimal", 0, ParameterDirection.Input, true, 18, 0, pnBankID)
.AddParameter("@piResellerID", "Int", 0, ParameterDirection.Input, true, 0, 0, piResellerID)
.AddParameter("@pnvBankName", "NVarChar", 50, ParameterDirection.Input, true, 0, 0, pnvBankName)
.AddParameter("@pnvBankAcronym", "NVarChar", 50, ParameterDirection.Input, true, 0, 0, pnvBankAcronym);
DataSet toReturn = c.FillDataSet();
return toReturn;
}
************END Sad Result -- LL v3.5****************************************
//the result of this going to the DB is
exec [dbo].[uspBank2Select] @pnBankID=-1,@piResellerID=-1,@pnvBankName=null,@pnvBankAcronym=null