<% 'Option Explicit Response.Buffer = True Dim sPageName, sCompany, sEmailServer, nTimeZone Dim dbCon, rsDb, rsDb2, sSql, sTitle, dTag, theUrl, sUrl, sDbError, sDbName Set dbCon = Server.CreateObject("adodb.connection") Set rsDb = Server.CreateObject("adodb.Recordset") Set rsDb2 = Server.CreateObject("adodb.Recordset") dTag = "#" ' Change for Database sCompany = "Lilly T's" theUrl = "//localhost/" sDbName = Server.MapPath("/") & "\Database\Icycle.mdb" 'dbCon.Open "Provider=Microsoft.Ace.OLEDB.12.0;Data Source=" & sDbName Sub DbErrors(sHdr, nSwt) If Err.Number <> 0 Then sDbError = sDbError & sHdr & ": " & Err.Description & "
" If nSwt = 1 Then sDbError = sDbError & sSql & "
" End If If nSwt = 2 Then sDbError = sDbError & sSql & "
" End Sub Function GetNullValue(sCol) GetNullValue = "" if rsDb.Eof then Exit Function if Not IsNull(rsDb.Fields(sCol).value) then GetNullValue = rsDb.Fields(sCol).value Call DbErrors("GetNullValue(" & sCol & ")", 0) End Function Function GetNullValue2(sCol) GetNullValue2 = "" if rsDb2.Eof then Exit Function if Not IsNull(rsDb2.Fields(sCol).value) then GetNullValue2 = rsDb2.Fields(sCol).value Call DbErrors("GetNullValue2(" & sCol & ")", 0) End Function Function SetQuotes(sField) SetQuotes = Replace(Request(sField), "'", "''") End Function Function GetNullDate(sCol) GetNullDate = "" If rsDb.Eof then Exit Function If Not IsNull(rsDb.Fields(sCol).value) Then GetNullDate = FormatDateTime(rsDb.Fields(sCol).value, 2) End If Call DbErrors("GetNullDate(" & sCol & ")", 0) End Function Function GetLongDate(sCol) Dim sDate, nDate sDate = GetNullDate(sCol) If IsDate(sDate) Then nDate = CDate(sDate) sDate = Day(nDate) & " " & MonthName(Month(nDate), True) & " " & Year(nDate) End If GetLongDate = sDate End Function Function GetNullCurrency(sCol) GetNullCurrency = "" If rsDb.Eof then Exit Function If Not IsNull(rsDb.Fields(sCol).value) Then GetNullCurrency = FormatCurrency(rsDb.Fields(sCol).value) End If Call DbErrors("GetNullCurrency(" & sCol & ")", 0) End Function Function GetChecked(sCol) GetChecked = "" If GetNullValue(sCol) = "Y" Then GetChecked = " checked " End Function Function SetChecked(sValue) SetChecked = "'N'" If sValue = "on" Then SetChecked = "'Y'" End Function Function SetDate(sValue) SetDate = "NULL" If sValue <> "" Then SetDate = dTag & Request("DueDate") & dTag End If End Function Function GetNow() Getnow = DateAdd("h", nTimeZone, Now()) End Function Function SetTime() Dim sTime sTime = FormatDateTime(GetNow()) sTime = Left(sTime, Len(sTime)-6) & Right(sTime, 3) SetTime = sTime End Function Function GetCodeValue(sOption, sCodeNo) Dim sValue sValue = "" If sCodeNo <> "" Then sSql = "Select * from Codes Where CodeType = '" & sOption & "' And CodeNo = " & sCodeNo set rsDb2 = dbCon.Execute(sSql) Call DbErrors("Option List", 0) If Not rsDb2.Eof Then sValue = rsDb2.Fields("CodeValue") rsDb2.Close End If GetCodeValue = sValue End Function Function GetEvents(sEvent, sCol) Dim sOptions, sValue On Error Resume Next sValue= GetNullValue(sCol) sOptions = " " & vbCrLf sSql = "Select * from Events Where EventName = '" & sEvent & "' Order By EventSeq" set rsDb2 = dbCon.Execute(sSql) Call DbErrors("Event List", 0) Do While Not rsDb2.Eof sOptions = sOptions & " " & vbCrLf rsDb2.MoveNext Loop rsDb2.Close GetEvents = sOptions End Function Function LapTime(nLap, nFlag) dim nT, nH, nM, nS, nF, sTime If nLap = 0 Then If nFlag = 1 Then sTime = "'DNF'" Else sTime = "''" End If Else nT = nLap nH = Fix(nT/3600) nT = nT Mod 3600 nM = Fix(nT/60) nS = nT Mod 60 sTime = "'" & nH & ":" If nM < 10 Then sTime = sTime & "0" & nM & ":" Else sTime = sTime & nM & ":" End If If nS < 10 Then sTime = sTime & "0" & nS & "'" Else sTime = sTime & nS & "'" End If End If LapTime = sTime End Function %>

Current Clothing Lines

* - Made in the USA