1) My error is:
ADODB.Fields error '800a0cc1'
ADO could not find the object in the collection corresponding to the name or
ordinal reference requested by the application.
/supweb/_fpclass/fpdblib.inc, line 12
2) My ASP/HTML code is (up to where it breaks down):
<html>
<head>
<title>L17Results</title>
<meta name="Microsoft Theme" content="copy-of-postmodern 111, default">
<meta name="Microsoft Border" content="tlb, default">
</head>
<body>
<p> </p>
<p><b><font face="Abadi MT Condensed Extra Bold" size="5">L17 Search
Results
for <font color="#0000FF"><%Response.write request.form
("OrgShop")%></font></font></b></p>
<p>Note: If printing change to Landscape mode</p>
<div align="left">
<table width="100%" border="1">
<thead>
<tr>
<td><b><font size="2">Squad</font></b></td>
<td><b><font size="2">Org/Shop</font></b></td>
<td><b><font size="2">Duty Section</font></b></td>
<td><b><font size="2">Office Symbol</font></b></td>
<td><b><font size="2">Last Name</font></b></td>
<td><b><font size="2">First Name</font></b></td>
<td><b><font size="2">Rank</font></b></td>
<td><b><font size="2">Phone Number</font></b></td>
<td><b><font size="2">Training Date</font></b></td>
<td><b><font size="2">DEROS</font></b></td>
<td><b><font size="2">Bldg</font></b></td>
<td><b><font size="2">Pri/Alt</font></b></td>
<td><b><font size="2">Classified</font></b></td>
<td><b><font size="2">CA/CRL Date</font></b></td>
<td><b><font size="2">MAJCOM</font></b></td>
</tr>
</thead>
<tbody>
<!--webbot bot="DatabaseRegionStart" startspan
s-columnnames="ID,SQUADRON,ORG/SHOP,DUTY SECTION,OFFICE
SYMBOL,LAST NAME,FIRST NAME,RANK,PHONE NUMBER,TRAINING DATE,DEROS,BLDG
NUMBER,PRIMARY/ALTERNATE,MAJOR COMMAND,Classified,CA/CRL Date"
s-columntypes="3,200,200,200,200,200,200,200,200,200,200,200,200,200,11,135"
s-dataconnection="Database4" b-tableformat="TRUE"
b-menuformat="FALSE" s-menuchoice s-menuvalue
b-tableborder="TRUE"
b-tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="TRUE"
b-listseparator="TRUE" i-ListFormat="0" b-makeform="FALSE"
s-recordsource
s-displaycolumns="SQUADRON,ORG/SHOP,DUTY SECTION,OFFICE
SYMBOL,LAST NAME,FIRST NAME,RANK,PHONE NUMBER,TRAINING DATE,DEROS,BLDG
NUMBER,PRIMARY/ALTERNATE,Classified,CA/CRL Date,MAJOR COMMAND"
s-criteria s-order
s-sql="Select * from [Master L17] where [Org/Shop] =
'%%orgshop%%'"
b-procedure="FALSE" clientside SuggestedExt="asp"
s-DefaultFields="orgshop=" s-NoRecordsFound="No Records
Returned"
i-MaxRecords="256" i-GroupSize="20" BOTID="0"
u-dbrgn1="../_fpclass/fpdbrgn1.inc"
u-dbrgn2="../_fpclass/fpdbrgn2.inc" tag="TBODY"
local_preview="<tr><td colspan=64
bgcolor="#FFFF00" align="left"
width="100%"><font color="#000000">Database
Results regions will not preview unless this page is fetched from a Web
server with a web browser. The following table row will repeat once for
every record returned by the query.</font></td></tr>"
preview="<tr><td colspan=64 bgcolor="#FFFF00"
align="left" width="100%"><font
color="#000000">This is the start of a Database Results
region.</font></td></tr>" u-dblib --><!--#include
file="../_fpclass/fpdblib.inc"-->
<%
fp_sQry="Select * from [Master L17] where [Org/Shop] = '%%orgshop%%'"
fp_sDefault="orgshop="
fp_sNoRecords="<tr><td colspan=15 align=left width=""100%"">No Records
Returned</td></tr>"
fp_sDataConn="Database4"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=20
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_iDisplayCols=15
fp_fCustomQuery=True
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" i-CheckSum="24740" endspan -->
3) The fpdblib.inc file consists of:
<% Function FP_FieldVal(rs, fldname)
FP_FieldVal = Server.HTMLEncode(FP_Field(rs, fldname))
if FP_FieldVal = "" then FP_FieldVal = " "
End Function
Function FP_Field(rs, fldname)
If Not IsEmpty(rs) And Not (rs Is Nothing) and Not IsNull(rs(fldname))
Then
Select Case rs(fldname).Type
Case 128, 204, 205 ' adBinary, adVarBinary, adLongVarBinary
FP_Field = "[#BINARY#]"
Case 201, 203 ' adLongVarChar, adLongVarWChar
if rs(fldname).DefinedSize > 255 then
' check for Access hyperlink fields (only absolute http
links)
fp_strVal = rs(fldname)
fp_idxHash1 = InStr(LCase(fp_strVal),"#http://")
if fp_idxHash1 > 0 then
fp_idxHash2 = InStr(fp_idxHash1+1,fp_strVal,"#")
if fp_idxHash2 > 0 then
' this is an Access hyperlink; extract the URL
part
fp_strVal = Mid(fp_strVal,fp_idxHash1+1)
if Right(fp_strVal,1) = "#" then
fp_strVal = Left(fp_strVal,Len(fp_strVal)-1)
end if
end if
end if
FP_Field = fp_strVal
else
FP_Field = rs(fldname)
end if
Case Else
FP_Field = rs(fldname)
End Select
Else
FP_Field = ""
End If
End Function
Function FP_FieldHTML(rs, fldname)
FP_FieldHTML = Server.HTMLEncode(FP_Field(rs, fldname))
End Function
Function FP_FieldURL(rs, fldname)
FP_FieldURL = Server.URLEncode(FP_Field(rs, fldname))
End Function
Function FP_FieldLink(rs, fldname)
FP_FieldLink = Replace(FP_Field(rs, fldname), " ", "%20")
End Function
Sub FP_OpenConnection(oConn, sAttrs, sUID, sPWD, fMSAccessReadOnly)
Dim sTmp
Dim sConnStr
Dim fIsAccessDriver
fIsAccessDriver = (InStr(LCase(sAttrs), "microsoft access driver") > 0)
sConnStr = FP_RemoveDriverWithDSN(sAttrs)
sTmp = sConnStr
On Error Resume Next
If fMSAccessReadOnly And fIsAccessDriver Then
sTmp = sTmp & ";Exclusive=1;ReadOnly=1"
Err.Clear
oConn.Open sTmp, sUID, sPWD
If Err.Description = "" Then Exit Sub
End If
Err.Clear
oConn.Open sConnStr, sUID, sPWD
End Sub
Function FP_RemoveDriverWithDSN(sAttrs)
FP_RemoveDriverWithDSN = sAttrs
sDrv = "driver="
sDSN = "dsn="
sLC = LCase(sAttrs)
if InStr(sLC, sDSN) < 1 then exit function
idxFirst = InStr(sLC, sDrv)
if idxFirst < 1 then exit function
idxBeg = idxFirst + Len(sDrv)
if Mid(sLC,idxBeg,1) = "{" then
idxEnd = InStr(idxBeg, sLC, "}")
if idxEnd > 0 and Mid(sLC,idxEnd+1,1) = ";" then
idxEnd = idxEnd + 1
end if
else
idxEnd = InStr(idxBeg, sLC, ";")
end if
if idxEnd < 1 then idxEnd = Len(sLC)
FP_RemoveDriverWithDSN = Left(sAttrs,idxFirst-1) & Mid(sAttrs,idxEnd+1)
End Function
Sub FP_OpenRecordset(rs)
On Error Resume Next
rs.Open
End Sub
Function FP_ReplaceQuoteChars(sQry)
Dim sIn
Dim sOut
Dim idx
sIn = sQry
sOut = ""
idx = InStr(sIn, "%%")
Do While (idx > 0)
sOut = sOut & Left(sIn, idx - 1)
sIn = Mid(sIn, idx + 2)
if (Left(sIn,1) = "%") And (Left(sIn,2) <> "%%") then
sIn = Mid(sIn, 2)
sOut = sOut & "%"
end if
sOut = sOut & "::"
idx = InStr(sIn, "%%")
if idx > 0 then
sOut = sOut & Left(sIn, idx - 1)
sIn = Mid(sIn, idx + 2)
sOut = sOut & "::"
if (Left(sIn,1) = "%") And (Left(sIn,2) <> "%%") then
sIn = Mid(sIn, 2)
sOut = sOut & "%"
end if
end if
idx = InStr(sIn, "%%")
Loop
sOut = sOut & sIn
FP_ReplaceQuoteChars = sOut
End Function
Sub FP_Close(obj)
On Error Resume Next
obj.Close
End Sub
Sub FP_SetCursorProperties(rs)
On Error Resume Next
rs.CursorLocation = 3 ' adUseClient
rs.CursorType = 3 ' adOpenStatic
End Sub %>