Wednesday, December 22, 2010

A 20 Hour Fix to a 5 Minute Issue

Well, after staying up late last night, I finally figured out how to get a combo box to 'fill' based on the selection from another combo box. Far into the test, I realized that in the actual application (I'm just playing with a dummy application at the moment) I actually had two tables to do what I was trying to do with one. So, I created a second table in the database and resultingly, a second binding source in Visual Studio.

Once the second binding was in place, I could do a simple lookup in one combo box, then 'fill' the other based on some specialized SQL statements. The actual implementation took about 5-10 minutes, whereas I worked approximately 20ish hours researching on how to do it.

I dont know if it was because I was using a Microsoft Access database, but it was very hard to find thorough information on how to do this simple operation. I found very helpful guides on Microsoft. But, I found that I had to search around a lot...one guide would answer one part of the question, and I'd have to search for another half hour to figure out another part.

For example, I had to look at a separate guide about table adapters, then another about binding sources, then another about adding SQL statements, then another for code relating to filling controls.

Perhaps I'll write my own guide. ;)

No comments:

Post a Comment