Hi guys this is my first post and I am a programming hack who is trying to learn. I am attempting to insert a record into an MS SQL DB table based upon a combination of textbox text, recordset data and sql sub-queries as my values. I am enumerating the scripting so that there is a new txtbox ID, new java function

Set Conn = Server.CreateObject("ADODB.Connection")
ConfConn="DRIVER={SQL Server}; Server=home; UID=user; PWD=pass; Database=DB01"
Conn.open ConfConn
set rs = conn.execute("EXEC Stored_Proc1")
Response.Write "<table ID = DataTbl Border=1 CellPadding=0 CellSpacing=0>"
Response.Write "<tr style='background-color:#60759B'>"
For Each objField in rs.Fields
Response.Write "<td><FONT COLOR=#ffffff><center><bold>" & objField.Name & "</bold></center></FONT></td>"
Next
Response.Write "</tr>"
Counter = 0
do until rs.EOF
Counter = Counter + 1
Response.Write "<TR>"
Response.Write "<TD>" & rs(0) & "</TD>"
Response.Write "<TD>" & rs(1) & "</TD>"
Response.Write "<TD>" & rs(2) & "</TD>"
Response.Write "<TD>" & rs(3) & "</TD>"
Response.Write "<TD>" & rs(4) & "</TD>"
Dim stuff0
set stuff0 = rs(0)
q1quest = "SELECT PatSys FROM Enc WHERE EpsId = stuff0"
set q1 = conn.execute (q1quest)
q2quest = "SELECT AdmSys FROM Enc WHERE EpsId = stuff0"
set q2 = conn.execute (q2quest)
Response.Write "<SCRIPT LANGUAGE=" & chr(34) & "JavaScript" & chr(34) & ">function UpdClmSts" & Counter & "(){sql =" & chr(34) & "insert into EntEvt (EntSys, AdmSys, EtrDat, EvtTyp, BegDatTim, EndDatTim, EvtTxt, PhySys, FacSys) values (" & q1 & ", " & q2 & ", " & NOW() & ", CT, " & NOW() & ", Status" & Counter & ".Text , 0, 0 )" & chr(34) & ";} </SCRIPT>" & "<TD>" & rs(5) & "<br><INPUT TYPE=TEXTAREA SIZE=" & chr(34) & " 25,5" & chr(34) & " ID = Status" & Counter & "><br><Center><BUTTON onClick= "& chr(34) & "UpdClmSts" & Counter & "(); " & chr(34) & ">Update Claim Status</BUTTON></Center>" & "</TD>"
Response.Write "<TD>" & rs(6) & "</TD>"
Response.Write "<TD>" & rs(7) & "</TD>"
Response.Write "<TD>" & rs(8) & "</TD>"
Response.Write "<TD>" & rs(9) & "</TD></TR>"
rs.MoveNext
loop
rs.close
conn.close: set conn = nothing
Response.Write "</table>"

I would like to comment my code but I do not know where it is safe to do that. Believe it or not, I have a lot of creative code that is working well! All help is welcome. Thanks in advance.