My asp.net project, which has previously been fine, suddenly starts doing the squiggly line under the @PAGE directive moaning about ASP.NET runtime error: could not load file or assembly... etc. I get the following error when I try and debug. I've tried all the really obvious stuff... cleaned, rebuilt, deleted [...] read more
I've been learning C# for a little over a month. I am working on an exercise where I ask the user to enter a time in a 24-hour clock format and check if it's valid. That's not important though. My problem is I'm confused about an error. The below code [...] read more
This Question is related to What is it about DataTable Column Names with dots that makes them unsuitable for WPF's DataGrid control?. I'm using a datagrid to show results for an ad hoc query builder, so the datatable columns can be anything. I followed the answer with the most votes [...] read more
In SSIS package “script component” is failing due to the following exception. This exception is occurring sometimes only. This script component contain Try/Catch, still it’s failing. What could be the reasons for this exception? Error Message -------------------------------------------------------------------------------- 5246793 User:OnError Package1 2015-01-16 03:40:45.000 2015-01-16 03:40:45.000 00:00:00 System.IndexOutOfRangeException: Index was outside the [...] read more
BindingList was the correct answer, it fixed all of the problems, including being able to format the columns. Here are the only lines I had to change, and everything is working perfectly now. //This went at the top: BindingList<Ingredient> selectedIngredients = new BindingList<Ingredient>(); //This went in the page Load method: [...] read more
I'm attempting to call a stored procedure in DB2 using the Dd2OleDb ver.6 driver from C#. When calling cmd.ExecuteNonQuery, an OleDbException with a SQLCode of -379 is thrown. Full message is below. I have a similar call to another stored procedure that works fine. Both stored procedures work fine when [...] read more
I have an EF Core website that is set up in the typical way. This has worked fine. However, I added a Controller Method that gets hit several times per second and when there are multiple active threads, EF throws an exception. If the requests are a few seconds apart, [...] read more
I have been attempting to write a WPF UI for the WiX installer that chains multiple msis from our company together. I have followed This Link to do so, however, I cannot get the ui app tp open at all. I have gotten the command line to run the MyBootstrapper.exe [...] read more
I'm trying to select one specific row from my mysql database. In SQL I'd just use select * from endkunden where id = 2; this works just fine, I get everything I want. Now I want to do this in my c# code and save the data into a string [...] read more
Built code to attach employees workdate for a calendar to be marked red when an employee is assigned to a workdate. But it cannot find table 0 when trying to run the code > System IndexOutOfRangeException HResult 0x80131508 Message Cannot find table > 0. public partial class Schema: System.Web.UI.Page { [...] read more
I'm trying to manage data by transferring ListViewItem objects from different ListViews (All of them are created on runtime) And I'm facing a number of odd errors. Running this loop: foreach (ListViewItem item in items) { this.view.Items.Add((ListViewItem)item.Clone()); } gives me this error: System.IndexOutOfRangeException occurred HResult=0x80131508 Message=Index was outside the bounds [...] read more
I am getting an error message when taking in command line arguments into an array. The error message states the index was outside the bounds of the array. I've never done this before and found an example online where this works. This also works with local file paths but not [...] read more
I have a list of postal codes and the cities the codes are for in a text file. The data looks like this: 2450,København SV 2500,Valby 2600,Glostrup 2605,Brøndby 2610,Rødovre 2625,Vallensbæk 2630,Taastrup 2635,Ishøj 2640,Hedehusene There are 580 lines of text there. I started by converting the text to jagged array[][] but [...] read more
I am trying to access an array inside a button I am creating when a new object is created, but the button goes out of array boundaries when I am using him (but accessing the very same index outside of the button yields no problem) Relevant code (see the category [...] read more