Quantcast
Channel: patterns & practices – Enterprise Library
Viewing all articles
Browse latest Browse all 1928

New Post: Execute DataSet - Not returning data - URGENT HELP NEEDED

$
0
0

I am using entlib 4.1 in my ASP.Net C# application. I am consulting at a company and have no other .NET resources to ask for help. We are going live into production with this application on 1/1/13.

I have implemented entlib 4.1 data block into the application. I use it for all my data calls. I have created a data layer class in my application for managing all the data calls. The code has been in place for over a month and everything has been working without any issues.

Yesterday morning all of a sudden one of the methods in my data layer which executes the ExecuteDataSet method of the data block has stopped working! The ExecuteDatset command runs, no errors or exceptions are raised. The SP I am calling has an output parameter which is getting returned just fine. When I run my code in DEBUG and I view the dataset returned it is completely empty!

I ran the SP from SQL management studio with the same parameters and it returns 4 rows of data along with the output parameter. I am completely lost as to how to track down this problem? Listed below is my method in my data layer.

I really need to get this resolved, ASAP. If someone can please help me here I would greatly appreciate it!

public DataSet ReqHeaderSearchByPage(Int32 intCurrPage, Int32 intPageSize, Int32 intRQID = 0, Int32 intSTS = 0, string strREQ = null, Int32 intORG = 0, Int32 intRType = 0, Int32 intORM  = 0)
            {try
                {
                    DataSet dsHDR;
                    OrmDB = DatabaseFactory.CreateDatabase("OrmDB");
                    sqlCommand = "[dbo].[ORM_RequestHeader_SearchByPage]";
                    DbCommand dbCmd = OrmDB.GetStoredProcCommand(sqlCommand);if (intRQID != 0)
                    {
                        OrmDB.AddInParameter(dbCmd, "@RQID", DbType.Int32, intRQID);
                    }if (intSTS != 0)
                    {
                        OrmDB.AddInParameter(dbCmd, "@STS", DbType.Int32, intSTS);
                    }if (strREQ != null)
                    {
                        OrmDB.AddInParameter(dbCmd, "@REQ", DbType.String, strREQ);
                    }if (intORG != 0)
                    {
                        OrmDB.AddInParameter(dbCmd, "@ORG", DbType.Int16, intORG);
                    }if (intRType != 0)
                    {
                        OrmDB.AddInParameter(dbCmd, "@TYP", DbType.Int32, intRType);
                    }if (intORM != 0)
                    {
                        OrmDB.AddInParameter(dbCmd, "@ORM", DbType.Int32, intORM);
                    }
                    OrmDB.AddInParameter(dbCmd, "@P_CurrentPageIndex", DbType.Int32, intCurrPage);
                    OrmDB.AddInParameter(dbCmd, "@P_PageSize", DbType.Int32, intPageSize);
                    OrmDB.AddOutParameter(dbCmd, "@P_TotalRecords", DbType.Int32, 6);
                    dsHDR = OrmDB.ExecuteDataSet(dbCmd);if (OrmDB.GetParameterValue(dbCmd, "@P_TotalRecords") != null)
                    {
                        _intTotalRecs = Convert.ToInt32(OrmDB.GetParameterValue(dbCmd, "@P_TotalRecords"));
                    }return dsHDR;
                }catch (Exception ex)
                {
                    LogApplicationError(ex, "ORM_DAL-ReqHeaderSearchByPage", _strUserName);
                    _intTotalRecs = 0;returnnull;
                }
            }


Viewing all articles
Browse latest Browse all 1928

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>