Hi Guys,
I have a stored proc that returns data on the fly. What I mean by this is if I run the proc it returns a listing of categories. If I run the proc with a category it returns a listing of types and if I run the prco with a category and type it returns and listing of items. Now my asp code to retunr the list is not working. This is the code. Why do I not get a listing of categories. Thanks.
oConn.Open
oCmdTerritory.ActiveConnection = oConn
oCmdTerritory.CommandType = adCmdStoredProc
oCmdTerritory.CommandText = "p_aic_sam_fatchCat"
errstatus = false
err.Clear
On Error Resume Next
Set objRSTerritory = oCmdTerritory.Execute
if err.number <> 0 then
err.Clear
errstatus = true
end if
%>
<tr>
<td width="26%" height="13"><font face="Arial" size="2"><b>Category</b></font></td>
<td width="83%" height="13"><font face="Arial" size="1">
<SELECT NAME="Territory" SIZE="1" style="font-family: Arial; font-size: 8pt; position: relative; width: 200">
<%
while not objRSTerritory.EOF
if Trim(objRSTerritory("Category")) <> 0 then
%>
<center><option value="<%=Trim(objRSTerritory("Category"))%>">
<%=Trim(objRSTerritory("Category"))%></option>
</center></option>
<% end if
objRSTerritory.MoveNext()
wend
%>
</SELECT>
</TD>
<TD></TD>
</TR>
I have a stored proc that returns data on the fly. What I mean by this is if I run the proc it returns a listing of categories. If I run the proc with a category it returns a listing of types and if I run the prco with a category and type it returns and listing of items. Now my asp code to retunr the list is not working. This is the code. Why do I not get a listing of categories. Thanks.
oConn.Open
oCmdTerritory.ActiveConnection = oConn
oCmdTerritory.CommandType = adCmdStoredProc
oCmdTerritory.CommandText = "p_aic_sam_fatchCat"
errstatus = false
err.Clear
On Error Resume Next
Set objRSTerritory = oCmdTerritory.Execute
if err.number <> 0 then
err.Clear
errstatus = true
end if
%>
<tr>
<td width="26%" height="13"><font face="Arial" size="2"><b>Category</b></font></td>
<td width="83%" height="13"><font face="Arial" size="1">
<SELECT NAME="Territory" SIZE="1" style="font-family: Arial; font-size: 8pt; position: relative; width: 200">
<%
while not objRSTerritory.EOF
if Trim(objRSTerritory("Category")) <> 0 then
%>
<center><option value="<%=Trim(objRSTerritory("Category"))%>">
<%=Trim(objRSTerritory("Category"))%></option>
</center></option>
<% end if
objRSTerritory.MoveNext()
wend
%>
</SELECT>
</TD>
<TD></TD>
</TR>