Software, Web, Windows

Help, I’ve Been Bitten by an ASP!

ASP.NET that is. And I think its poisonous because I feel like I want to die.

The background (for those who are really bored or have a heart)…

or skip below to the solution

Today I needed to make some modifications to a website for the Testing Center. I simply wanted to add a section to a page that listed all the students currently registered in the test schedule that was selected.

Logically, I started off by defining my query to select all students having registrations with a schedule ID of (currently selected schedule ID) . Give or take a few seconds and this is about where the sanity of ASP.NET ends.

Next, I tie in the SQL and pull the selected Schedule ID. Amazingly, this works first try (a rarity with ASP.NET). Well, it kinda works. Because this table joins with other tables, I saw a first and last name for each of the registrations. However, one of the tables that I pull from doesn’t necessarily have a corresponding entry for this student.

Logically, I would assume I want to check and see if a row for that student in the table in question exists (and create one if its AWOL). I have to do this AFTER I know the student ID, but BEFORE it runs my new query.

The solution…

I fought for four hours before I gave up, trying to just loop over a damn row and use its student ID as an input to another query. I tried pounding my fists, cussing at the computer, flicking the bird, threatening the life of the computer, and telling it I was going to kill its creator in his sleep. None of these things did any good. I looked on the Internets, and people in forums were lost doing the same task as I. It has become a dark world.

At the fifth hour, I decided fuck this, and changed the original code to just create an empty table entry when it creates the registration so the AWOL condition above will never be reached.

The moral of this sad tale of woe…

So what then is the moral? That we are in fact the slaves of the machines? That Visual Studio is for people that like cutting themselves? That Microsoft’s time in this world is quickly reaching the end?

I think that the moral is that code you don’t control is code you don’t care about. Seriously, the website is dead to me. They got their change, and now I am done. PHP and Rails, I would never leave you!

Advertisements

2 thoughts on “Help, I’ve Been Bitten by an ASP!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s