Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS VB Script runtime error '800a01a8'

Status
Not open for further replies.

mmchenney

Technical User
May 16, 2001
16
0
0
US
Getting Error message Can you Help!

Microsoft VBScript runtime error '800a01a8'

Object required: ''

/regions/Webpages/HHSC_Voice_Consolidation/TMP2qe1hvhr4j.asp, line 109

<%@LANGUAGE=&quot;VBSCRIPT&quot;%>
<!--#include virtual=&quot;/regions/Connections/regional_personnel1.asp&quot; -->
<%
%>
<%
u_input = trim(request.form(&quot;u_input&quot;)) 'u_input is the varible for user input
' the trim function removes any blanks around the the use input
u_field=request.form(&quot;u_field&quot;) 'the dropdown varible for user inputted search field

if u_input <> &quot;&quot; then ' If the user entered a value query the db
accessdb=&quot;Regional_Personnel&quot; ' name of the access db
table_name=&quot;HHSC_VoiceInventory&quot; ' name of the table within the access db
cn=&quot;driver={microsoft access driver (*.mdb)};&quot;
cn=cn & &quot;dbq=&quot; & server.mappath(accessdb)
set rs = server.createobject(&quot;ADODB.Recordset&quot;)
Recordset1.ActiveConnection = MM_regional_personnel1_STRING
sql = &quot;select * from HHSC_VoiceInventory where &quot; & u_field & &quot; like '%%&quot; & u_input & &quot;%%' &quot;
response.write sql
rs.Open sql, cn

if rs.eof or rs.bof then
response.write &quot;No results found...&quot;
observations=0
else
observations=1
end if 'end check for observations
end if 'end check for user input
%>
<% 'If there are observations then display them
if observations > 0 then %>
<table>
<tr>
<% 'Write the field names
for each table_element in rs.fields %>
<td><b><%= table_element.name%></B></TD><%
next %>
</tr>
<tr>
<% 'Write the values
rs.movefirst
do while not rs.eof
for each cell in rs.fields %>
<td><%= cell.value %></td><%
next %>
</tr>
<% rs.movenext
loop %>
</table>
<% end if 'end of check of obs for display %>


<form action =&quot;<%= request.servervariables(&quot;script_name&quot;) %>&quot; method=&quot;post&quot;>
<input type=&quot;text&quot; name=&quot;u_input&quot; value=&quot;<%= u_input %>&quot;>
<select name=&quot;u_field&quot; size=&quot;1&quot;>
<option <% ' write out all the search fields and select
if u_field = &quot;ID&quot; or u_field = &quot;&quot; then
response.write &quot;selected &quot;
end if
%>value=&quot;ID&quot;>ID</option>
<option <%
if u_field = &quot;Region&quot; then
response.write &quot;selected &quot;
end if
%>value=&quot;Region&quot;>Region</option>
<option <%
if u_field = &quot;Address&quot; then
response.write &quot;selected &quot;
end if
%>value=&quot;Address&quot;>Address</option>
</select>
<input type=&quot;submit&quot; value=&quot;Submit&quot;>
</form>

 
I can't see anything wrong with the code but I know when I get that same error it usually means the object you're accessing is not there so double triple check the spelling and or even case of the file. provide tools to let people become their best.
 
First, it's hard to identify line 109 because we don't know what's in your include file, regional_personnel1.asp.

But my guess is this line:

Recordset1.ActiveConnection = MM_regional_personnel1_STRING

Where did the object Recordset1 come from? Jon Hawkins
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top