This is a little page I like to call the yellow page of death.

If you’ve done much ASP.Net development at all I’m sure you’ve run into this error, and probably had the experience of trying to set <customErrors mode=”Off” /> but yet this error still displays. I figured I would post a nice little algorithm I use whenever I get this error message and setting the Mode to Off doesn’t work:
- Verify the folder is an application in IIS
- Verify the application is set to the proper version of .Net and in the correct application pool for that version
- Make sure the web.config is proper XML
- This can be done by renaming web.config to web.xml and loading it in IE
- Set the web.config in the parent folder to <customErrors mode=”Off” />
I’ve found that by running through all these I have always been able to fix this error message so that I can get a much less general message about what is actually going on.
Recently I had to export the data for an Access database into excel spreadsheets. This should have been pretty easy because they’re both Microsoft products and Microsoft likes to tout the interoperability of its products. At first glance it looked really easy, just right click on the table you want to export and go to export to Excel. The problem was this isn’t just some access database, it’s the mother of all access databases.
There are about 4 million records in the table (I was suprised access could handle that many records) and the latest version of Excel only supports about 1 million rows so I was going to have to generate about 4 excel spreadsheets. This seems like an easy SQL 101 problem, create 4 queries, one that selects records 1-1,000,000, then 1,000,001 to 2,000,000, and so on but to my surprise that was basically impossible because there was no auto number field on the table. Well I thought this shouldn’t be hard I’ll just add an autonumber column then write my queries but the problem with that was whenever I tried to add the field it would increase the access database size above the maximum size of 2GB.
Next I thought well I’ll just select top 1,000,000, generate the excel spreadsheet, then delete the records I selected and repeat. This idea however wasn’t possible because the table didn’t contain any primary key fields so I didn’t really have an easy way to delete the records I had already exported. Also access doesn’t have any type of row_number method (like Sql Server) so I couldn’t generate a pseudo primary key on the fly.
Finally I just gave in and installed Sql Server on my computer and imported all the data into it. Once the data was imported Sql Server had no problem letting me add an identity field to the table (although it did take about 5 minutes for the script to complete). Once that was done I just had to write my select statements when using the export wizard in Sql Server.
In closing I think I’ve found a nice example of something I already knew… friends don’t let friends use Access databases for large datasets.
So I spent the last hour or so trying to find out how to get a reference to (or the ID of) the selected tab element (or panel) from jQueryUI. All the searching I did kept coming back with how to get the selected index but that didn’t do much good because I needed to do a .find on all elements inside the selected tab so I had to have a reference to it.
Finally after getting nothing but a few hints I opened up firebug (best addon ever) and just did:
$("#MyTabs").data()
And dug through the output with firebug. I saw that there was a tabs element inside that contained a panels array so I found what I was looking for. I’m pretty sure this isn’t a documented way to get what I was looking for but I couldn’t find any other way so use at your own risk.
var Tabs = $("#MyTabs");
Tabs.data("tabs").panels[Tabs.tabs("option", "selected")]); //gives you the html element that is being displayed for the selected tab
Keep in mind this returns a reference to the html element that is displayed when the current tab is selected. If you want it to be a jQuery object just surrond the second statement with $().