Nothing was being recorded in the trace when the web-forms was calling the library. I then checked SQL Profiler and this is where things seemed a little odd. I then ran the stored procedure in SQL management Studio and it matched the xUnit test with 1 item returned. These were captured during debugging to ensure they matched. Now, all of a sudden the above has stopped working and Summaries is always empty.Ĭreated a test using xUnit with the same parameters used by the website. So as I say, everything was working fine. var Summaries = MyLibrary.Fetch(ConnectionString, 1, 111, false) The above is in a library and is called like this in the Web Forms site. Using (SqlDataAdapter da = new SqlDataAdapter(dbCommand))įor (int i = 0 i < i++) Code to add parameters and set commandText goes here Using (SqlCommand dbCommand = dbConnection.CreateCommand()) // Result is complexĭbCommand.CommandType = CommandType.StoredProcedure Using (SqlConnection dbConnection = new SqlConnection(Connection)) public List Fetch(string Connection, int parameter1, int parameter2, bool parameter3) So here is some code, please note it's just basic outline of code as actual code contains confidential information. I have an ASP.Net Webforms website running in IIS on a Windows Server.Įverything has been working fine with the site but now I am seeing issues with using a DataAdapter to fill a table.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |