","")
strLine = Replace(strLine, chr(34), "") ' quotes
strLine = LTrim(strLine)
While Len(strLine) > 0 ' parse the values
if UCase(Left(strLine,4)) = "NAME" Then
strLine = Mid(strLine,5)
strLine = Replace(strLine,"=","")
strLine = LTrim(strLine)
strLineU = UCase("strLine")
position = Instr(1, strLine, " ")
if position = 0 Then
strFieldName = UCase(RTrim(strLine))
strLine = ""
else
strFieldName = UCase(Left(strLine, position - 1))
strLine = Mid(strLine, position + 1)
end if
else ' there's only NAME to check, if it's not there then something's wrong
Response.Write "Error: |" & strLine & "|
"
strLine = ""
end if
Wend
' Go find the ordinal position of the field in the table structure
x = 0
y = 0
While y <= UBound(aFields)
If UCase(aFields(y, 1)) = strFieldName Then x = y
y = y + 1
Wend
if x = 0 Then
Response.Write "Error: " & strFieldName & " is not a field in this table. "
Else
If Mid(strDisplay, x, 1) = "0" OR (strKeyField = x) Then
' Do not display the field
Else
' See if the field is an alias for another description (from dbCombo)
strCombo = "dbCombo" & CStr(x)
If Trim(Session(strCombo)) & "x" = "x" Then
' Get the value
curVal = aFields(x,4)
' Blank or null
If IsNull(curVal) Then curVal = " "
If Trim(curVal) & "x" = "x" Then curVal = " "
' Password
If UCase(Left(aFields(x,1),8)) = "PASSWORD" Then curVal = "*****"
' Format the various field types
Select Case aFields(x,2)
case 6 ' Currency
if NOT(curVal = " ") then curval = FormatCurrency(curval,2,-1)
case 7, 135 ' Date / Time
if NOT(curVal = " ") then curVal = FormatDateTime(curVal)
case 11 ' Boolean
If curVal Then
curVal = txtTrue
Else
curVal = txtFalse
End If
case 129, 130, 200, 201, 202, 203 ' String and memo
if NOT(curVal = " ") then
curVal = replace(curVal,"<","<")
curVal = replace(curVal,">",">")
curVal = replace(curVal,chr(10),"
")
end if
End Select
' Image
If (UCase(Left(aFields(x,1),3)) = "IMG") Then curVal = LT & "IMG SRC=" & QUOTE & curVal & QUOTE & GT
' Check for E-mail address
strContainsURL = "dbEMailfor" & CStr(x)
If Session(strContainsURL) > 0 Then
strURL = aFields(Session(strContainsURL),4)
curVal = Replace(curVal,"mailto:","")
If Trim(strURL) & "x" <> "x" Then curVal = "" & curVal & ""
End If
' Check for link
strContainsURL = "dbURLfor" & CStr(x)
If Session(strContainsURL) > 0 Then
strURL = aFields(Session(strContainsURL),4)
If Trim(strURL) & "x" <> "x" Then
curVal = "" & curVal & ""
' *** Uncomment the following line to strip all #'s from Access hyperlink fields
' curVal = Replace(curVal,"#","")
End If
Else
If UCase(Left(curVal,7)) = "HTTP://" Then
curVal = LT & "A HREF=" & QUOTE & curVal & QUOTE & GT & curVal & LT & "/A" & GT
' *** Uncomment the following line to strip all #'s from Access hyperlink fields
' curVal = Replace(curVal,"#","")
End If
End If
' Display it already
Response.Write curVal
Else
' Look up the value to display
arrCombo = Split(Session(strCombo),",")
' LIST
If Trim(UCase(arrCombo(0))) = "LIST" Then
For y = 1 to UBound(arrCombo) Step 2
arrCombo(y) = LTrim(arrCombo(y))
arrCombo(y+1) = LTrim(arrCombo(y+1))
If arrCombo(y)=aFields(x,4) Then Response.Write arrCombo(y+1)
Next
End If
' TABLE
If (Trim(UCase(arrCombo(0))) = "TABLE") OR (Trim(UCase(arrCombo(0))) = "TBL") Then
strComboTable = Trim(arrCombo(1))
strComboValueFldNo = CInt(arrCombo(2))-1
strComboDescFldNo = CInt(arrCombo(3))-1
strsql = "SELECT * FROM [" & strComboTable & "]"
If strType = "SQL" Then
strsql = Replace(strsql,"[","")
strsql = Replace(strsql,"]","")
End If
set xConn = Server.CreateObject("ADODB.Connection")
xConn.Open strConn
set tlkpRs = Server.CreateObject("ADODB.Recordset")
tlkpRs.Open strsql, xConn, 2, 3
Do While NOT tlkpRs.EOF
If tlkpRs.Fields(strComboValueFldNo)=aFields(x,4) Then Response.Write tlkpRs.Fields(strComboDescFldNo)
tlkpRs.MoveNext
Loop
tlkpRs.Close
Set tlkpRs = Nothing
xConn.Close
set xConn = Nothing
End If
End If ' is the value an alias from a lookup table or list
End If ' should the field be displayed
End If ' is the field in the table
' Display everything to the right of the field
Response.Write strRight & chr(13)
End If ' is the field tag properly terminated
Else ' line does not contain a field
Response.Write strLine & chr(13)
End If ' does the line contain a field tag
End If
Wend
%>
<% If Session("dbFooter") = 1 Then %>
<% End If %>