Can someone please help me out with the error I'm getting in the subject of this thread? I'm trying to loop into an Access database and pull out a recordset based on a parameter that is selected from a dropdown Form. Here's the code:
<!---------------------------------------------------------------------------------------------------------------------->
Sub writeBranchInfo()
Dim objConnInfo, objRS, Query
Set objConnInfo = Server.CreateObject("ADODB.Connection")
Set objRS = Server.CreateObject("ADODB.Recordset")
theTeam=Request.Querystring("id")
objConnInfpen "branch","",""
Query = "Select id, Branch_Name, Branch_Address, Branch_City, Branch_State, Branch_Zip, Branch_Phone, Branch_Fax, Branch_Website, Owner_Name from branch where branch.id = '" & theTeam & "' order by rank"
objRS.Open Query, objConnInfo
%>
<TABLE border="0" align="right" valign="bottom" CELLPADDING="0" CELLSPACING="0">
<%DO UNTIL objRS.eof%>
<TR><TD><IMG SRC="../images/grayPix.gif" width="200" height="1" BORDER=0></TD></TR>
<TR><TD class="empTitletBold"><%=objRS("Branch_Name")%></TD></TR>
<TR><TD class="empInfo"><%=objRS("Branch_Address")%></TD></TR>
<TR><TD class="empInfo"><%=objRS("Branch_City")%>, <%=objRS("Branch_State")%> <%=objRS("Branch_Zip")%></TD></TR>
<TR><TD class="empInfo">Phone: <%=objRS("Branch_Phone")%></TD></TR>
<TR><TD class="empInfo">Fax: <%=objRS("Branch_Fax")%></TD></TR>
<TR><TD class="empInfo"><A CLASS="empEmail" HREF=<%=objRS("Branch_website")%></A></TD></TR>
<TR><TD><IMG SRC="../images/clearPix.gif" width="1" height="10" BORDER=0></TD></TR>
<%
objRS.movenext
LOOP
%>
</TABLE>
<%
objConnInfo.Close
Set objConnInfo = Nothing
Set objRS = Nothing
End Sub
Thanks so much,
Matt
<!---------------------------------------------------------------------------------------------------------------------->
Sub writeBranchInfo()
Dim objConnInfo, objRS, Query
Set objConnInfo = Server.CreateObject("ADODB.Connection")
Set objRS = Server.CreateObject("ADODB.Recordset")
theTeam=Request.Querystring("id")
objConnInfpen "branch","",""
Query = "Select id, Branch_Name, Branch_Address, Branch_City, Branch_State, Branch_Zip, Branch_Phone, Branch_Fax, Branch_Website, Owner_Name from branch where branch.id = '" & theTeam & "' order by rank"
objRS.Open Query, objConnInfo
%>
<TABLE border="0" align="right" valign="bottom" CELLPADDING="0" CELLSPACING="0">
<%DO UNTIL objRS.eof%>
<TR><TD><IMG SRC="../images/grayPix.gif" width="200" height="1" BORDER=0></TD></TR>
<TR><TD class="empTitletBold"><%=objRS("Branch_Name")%></TD></TR>
<TR><TD class="empInfo"><%=objRS("Branch_Address")%></TD></TR>
<TR><TD class="empInfo"><%=objRS("Branch_City")%>, <%=objRS("Branch_State")%> <%=objRS("Branch_Zip")%></TD></TR>
<TR><TD class="empInfo">Phone: <%=objRS("Branch_Phone")%></TD></TR>
<TR><TD class="empInfo">Fax: <%=objRS("Branch_Fax")%></TD></TR>
<TR><TD class="empInfo"><A CLASS="empEmail" HREF=<%=objRS("Branch_website")%></A></TD></TR>
<TR><TD><IMG SRC="../images/clearPix.gif" width="1" height="10" BORDER=0></TD></TR>
<%
objRS.movenext
LOOP
%>
</TABLE>
<%
objConnInfo.Close
Set objConnInfo = Nothing
Set objRS = Nothing
End Sub
Thanks so much,
Matt