Posts

Showing posts from December, 2015

SqlHelper: Parameter count does not match Parameter Value count

I had a call to a ExecuteNonQuery that was giving me the error "Parameter count does not match Parameter Value" count.  In my case this error is an incorrect error.  No matter how many times I compared the parameters from the ones in the procedure the number was always the same. In this case the procedure needed a DateTime parameter, but I was incorrectly trying to give it a string.  Then it would throw that error. Once I put the correct DateTime parameter type it worked properly.

JqueryUI Datepicker Widget - Relative Min Max options

Turns out I am needing to have some date range restrictions on my datepicker.  Need user to only be able to select a relative range from today.  Including today and 10 days later, for example: $(".datepickerDateSent").datepicker({ minDate: 0, maxDate: "+10D" }); http://api.jqueryui.com/datepicker/#option-minDate

Asp.net - Output Excel Sheet from Memory Stream

This will allow the user to save the excel doc from the web.         MemoryStream ms = new MemoryStream();        //use whatever to save the excel workbook data to the memorystream         byte[] array = ms.ToArray();           Response.Clear();         Response.ContentType = "application/xlsx";         Response.AddHeader("Content-Disposition", "attachment; filename=test.xlsx");         Response.BinaryWrite(array);         Response.Flush();         Response.Close();         Response.End();

Linq To a DataTable

Not that familar with linq, but this does seem rather promising.  A query to get elements from a datatable. var sd = from myRow in myDt.AsEnumerable()                          where myRow.Field<int>("ID") == cbID                          select myRow.Field<DateTime>("DateSent"); http://stackoverflow.com/questions/10855/linq-query-on-a-datatable