Classic ASP (older site maintenace).

July 10, 2013

Lately I’ve been charged with adding some functionality to an older internal site done with good all Classic ASP and Java Script.

What a terrible mess. I’m fortunate to have learned to hook up Visual Studio to the code so I can step through the code and find out what makes it tick.

I has been a daunting task changing anything without breaking something else. I’m writing this in the middle of a break from the madness (I exaggerate of course), just so I’ll not run the hall way screaming!

In any case, Option Strict was not turned on, so there are hundreds of variables that are not dimmed. Some are mistyped (typos not the type kind) and forms are well.. malformed!

I hope I never do this to the next guy coming behind me!

BTW, if you are good programmer and you love coding don’t ever forget what it was like when you become a manager and start thinking that everything is easy!

Time Management Mistakes

April 29, 2011

The image lists some common time management mistakes. It is by no means all there is but we have to start somewhere.

What are your ideas on overcoming some of the issues outlined here?

Perhaps you could take one or two and outline how you have overcome that particular issue.

Mind Map of Commong Time Management Mistakes

Common Time Management Mistakes

DIY Stands for your keyboard!

November 6, 2010

About a year ago, I read an article that described sitting for extended periods time and the effect on one’s metabolism.

Recently another article came out, see it here: Couch Potato

For a long time I’ve had an alarm in Outlook remind me to get up, stand, stretch every so often.

I went all out this time and made a little keyboard stand so I can… well…stand for longer periods of time.

Home Made Raised Keyboard Stand

DIY Raised Stand

Now the alarm reminds me to sit down 🙂

Since my first attempt I have now added a second section for my other monitor. Everything is good so far.

Now my setup does not compare to the adjustable tables made by this company
Adjustable Tables

I really like the one below, only problem is that it costs about $4,000 and the model is not included!

Debugging Classic ASP

October 22, 2010
How wonderful it would be if we only worked on the latest and greatest! But Alas! That is not meant to be.

I’ve been using VS2003 to debug Classic ASP web sites we still support. The ability to insert breakpoints and step through the code has been great.

Recently I decided to use VS2010 to accomplish the same thing and here is what I’ve found out so far.

Visual Studio 2010 Splash Screen

I complicated my life a little bit more 🙂

Looking around the web I found various articles that discussed the steps to accomplish said debugging.

The first thing you need to do is make sure your classic ASP site is set as the default web site in your local IIS. The built in web server will not work with classic ASP sites.

Setting it up the classic ASP site as the default website was kind of odd for me. Since that’s not how we did it when using VS2003. We would have a normal local website and just open it using VS2003.

Well it was not that easy, you would create a new project add all the folders and files to it and then run it. That has not changed, it’s just that now the website you are debugging is at the top of the hierarchy in your local IIS.
Internet Information Server Properties Window

It is also important that you click on your Configuration button for the site:

Once you’re there, click on the Debugging tab and check Enable ASP server-side script debugging as well as client-side script if you need to.

Application Configuration Window

Make sure you apply, click Ok on the previous screen and you’re site is ready to be debugged.

But if you hit the start debugging button or press F5, you’ll get all sort of nasty errors.

What you have to do is view in browser first. That’s Ctrl+Shift+W or click the View in Browser icon:

You can get to Ctrl+Shift+W through the keyboard, the icon or under the File -> View In Browser menu item. This will start your website on your browser, running on your local IIS.

You are of course not done yet. You must attach to the process. And you do that by clicking on the menu item Debug -> Attach to Process, or menu item Tools -> Attach to Process or keyboard combination of Ctrl+Alt+P.

There was a write up back in 2006 for VS2005 here: Attaching to Process

It even has some code to create a macro to bypass this Ctrl+Umpteen+More madness!

Finally stepping through code in all it’s glory in Classic ASP:

Stepping through ASP code.

Classic ASP lives on!

Twitter Network

May 7, 2010

What would a partial circle of twitter entities looks like. I realized after I started this, how crazy this is. Can’t imagine having any more than this, but yes there are more. Just did not get to all of them.

Probably should have a bigger image, what do you think?
Most importantly, can you find yourself here?


Twitter users I follow!

How would you improve this?

April 21, 2010

The code below is what is mostly generated by Iron Speed code designer. I usually do most of the look up information linking on the database using foreign key links.

The look up table has three columns. A system id or code, a meta_type for categories and a description.

The filtering category is placed at the “somevalue” place holder. This whole thing is inserted into the section where the function affects the rows in question.

Some databases have multiple look up tables I use mostly one with categories to filtered for each look up.

Simple lookup table design.

Lookup table design.

#Region “Code Customization”

”’ Override the PopulateSYS_IDDropDownList function to filter contents of Dropdown list.
Protected Overrides Sub PopulateCODE_SYSIDDropDownList( _
ByVal selectedValue As String, _
ByVal maxItems As Integer)

‘ Set up the WHERE clause.
Dim wc As WhereClause = New WhereClause
wc.iAND(CODE_TABLETable.META_TYPE, BaseClasses.Data.BaseFilter.ComparisonOperator.EqualsTo, “somevalue“)

Dim orderBy As OrderBy = New OrderBy(False, True)
orderBy.Add(CODE_TABLETable.SYS_ID, BaseClasses.Data.OrderByItem.OrderDir.Asc)

Dim itemValue As CODE_TABLERecord
For Each itemValue In CODE_TABLETable.GetRecords(wc, orderBy, 0, maxItems)

‘ Create the item and add to the list.
Dim cvalue As String = itemValue.SYS_ID.ToString()
Dim fvalue As String = itemValue.Format(CODE_TABLETable.DESCRIPTION)
Dim item As ListItem = New ListItem(fvalue, cvalue)

‘ Set up the selected item.
If Not selectedValue Is Nothing AndAlso _
selectedValue.Trim “” AndAlso _
Not SetSelectedValue(Me.CODE_SYSID, selectedValue) Then
Dim fvalue As String = OSERVICES_PROVIDEDTable.CODE_SYSID.Format(selectedValue)
Dim item As ListItem = New ListItem(fvalue, selectedValue)
item.Selected = true
Me.CODE_SYSID.Items.Insert(0, item)
End If

‘ Add the Please Select item.
Me.CODE_SYSID.Items.Insert(0, New ListItem(MiscUtils.GetValueFromResourceFile(“Txt:PleaseSelect”, “Application”), “–PLEASE_SELECT–“))
End Sub

#End Region

Visual Studio 2010 New Features Map (will grow).

April 12, 2010

There are many new features available in VS 2010. Can’t wait to start using it. Meanwhile I’ve mapped the new features being highlighted in videos and other blogs. This list will get bigger I’m sure, especially the bugs list. The subtopic place holders are for features I’ll add later 🙂

Mind Map of Visual Studio 2010's New Features

Visual Studio 2010 New Features