1. You will require IIS (or maybe personal web server, but I wouldn't want that POS on my box

) to run this stuff.. with some edits you could run it as a vbscript but as a n00bie we'll just leave that alone
Set objRec = Server.CreateObject("ADODB.Recordset")
objRec.Open "SELECT PartNumber, UnitsOnHand FROM Part WHERE PartNumber = '" & t &"'", strConnect
This code would be the same as
Set objRec = Server.CreateObject("ADODB.Recordset")
objRec.ConnectionString = strConnect
objRec.Open "SELECT PartNumber, UnitsOnHand FROM Part WHERE PartNumber = '" & t &"'"
't' is the data you're getting from your form. Its populated from teh statement at the top
< t = Request.Form("n") >
There is a control called 'n' (bad name btw) .. this is named in the part that is like
<INPUT TYPE = "TEXT" NAME = "n"><BR>
So take the value of the text box called 'n' and place it into the variable 't' (another bad name

but assuming thats the teachers lazy coding )
The SQL does the actual work of pulling it from the DB
"SELECT PartNumber, UnitsOnHand FROM Part WHERE PartNumber = '" & t &"'",
Says get all the data from this table where the partnumber is <value from the form>
Set objRec = Server.CreateObject("ADODB.Recordset")
creates an instance of ADODB.Recordset which allows you to connect to an ODBC database.
strConnect at the end of your OPEN method tells the OPEN method where to look for your database
If you need that SQL to relate to YOUR DB then you need to get the necessary column names from your DB and put it in the sql
The format is
SELECT Column1, Column2... FROM TableName WHERE Column3 = "Some value"
OR You can put SELECT * FROM Tablename
That will get you ALL of the columns
That help?
If not let me know, maybe I can specify something more clearly