Final Answer
I was able to get some help on StackOverflow. You can read all the details here: sql server - SQL Recursive CTE Linked Chains - Stack Overflow The end results is that while a Recursive CTE would work, their suggestion was a different approach entirely. Here is the final result...
Close But No Cigar
I've made a little bit of progress on this one. I feel like there is something simple I am missing, and I'll probably look like an idiot when the solution presents itself. I've reduced the sample dataset and query and the results are ALMOST what I am looking for.
DECLARE...
Working Backward From Results
Sometimes I find it helpful to generate the desired output and work backwards. In this case, it's not helping me very much, but I thought I'd add this here in case it helps anyone else.
| INPUT | DATABASE CHAINS...
I'm having trouble wrapping my head around Recursive CTE's in SQL Server. My dataset (simplified version below for copy/paste) is a large table containing hundreds of thousands of chains. Each chain is made up of a number of components, linked together in a specific order for each chain. I've...
That is what I was trying to do. I limited my sample to Long, Integer, and Decimal to keep it simple and reproduce the InvalidCastException. In production, the Sample(Of ...) generic class can be anything that implements IComparable. If List(Of ISample(Of IComparable)) isn't correct, what is the...
I guess I am looking at it wrong as it makes sense to me. Defining a generic List(Of ...) with the same restrictions used in the generic class. In a way, it's like creating a List(Of Object) which can hold any kind of Class, because they all inherit from Object. I was viewing this as a widening...
Sometimes I just can't wrap my head around Generics...
For the sake of simplicity, I've boiled everything down to a very simple example that you can copy and paste. I have a generic interface which is restricted to types that implement IComparable. I have a Class that Implements this interface...
1) There are times where I need to execute methods on every object in the List and also perform additional tasks with the Checked items, hence the need to iterate the entire List as well as test if the item is Checked.
2) I (incorrectly) thought that the SelectedItems and CheckedItems were the...
How are you handling the KeyPress/Up/Down events in your app? If you move the mouse, does it turn on the monitor and bring you to the login screen? Does your app register any kind of hotkeys through user32.dll? If you can provide some sample code, I will take a look.
-E
I have a CheckedListBox with Items in it. If I iterate through the Items collection with a For Each loop and check if the SelectedItems collection contains the current Item, the For Each loop breaks on Next, acting as if I modified the collection. But I didn't modify the collection at all. I've...
No, passing the control is actually not a good idea. I threw it out there earlier to make your original code work with as few changes as possible. It wasn't pretty, and it wasn't any sort of best practice.
If you are using a backgroundworker, put the UI code in the ProgressChanged event...
Updated Sample
Ron,
I apologize for the confusion. I wasn't very clear in my explanation. The problems I pointed out are what was preventing the backgroundworker from updating the form. My goal was to answer your question as to why your code wasn't working as intended. At bare minimum, your...
Working Example
Ron,
I found a couple of problems. First, you are attempting to directly change the user controls on your form inside the asynch code, which will not work.
From MSDN: "You must be careful not to manipulate any user-interface objects in your DoWork event handler. Instead...
I'm getting the following exception:
"The URL does not use a recognized protocol"
MyWin.Open("GET", "C:/Parsing-Splitting.html", False)
I created a copy of the HTML you pasted into Parsing-Splitting.html but I think WinHTTPRequest is expecting some sort of an HTTP protocol and not a local...
Missing ParseInfo function
I'm trying to duplicate the issue but the ParseInfo function isn't included in the above code. Do I need to add a reference to some other COM object (other than WinHTTP)? Or is this a custom function that you wrote?
-E
After thinking about this over the weekend, I decided to use the Bounds (Top/Bottom) of each item in the list to determine if the Drag/Drop was dropping between items (on a header group) or at the end of the list. I also corrected an error in the Drop code. In the old version, when rearranging...
It would be helpful if you could also post the stacktrace from the exception. We need to know which line of code is triggering the overflow in order to isolate which variable/property is causing the issue.
Try changing:
MessageBox.Show("Unable to Set IP : " & ex.Message)
Into this...
You'll find sample code to illustrate the problem below. Make a new Form in a VS 2013 WinForm Project, paste and run.
I have 2 ListView controls and I have Drag & Drop working between the controls. Items can be moved from one control to the other. Items can be rearranged within the control as...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.