Forum Moderators: open

Message Too Old, No Replies

Microsoft VBScript runtime error '800a01a8'

         

jefferson

10:33 pm on Mar 20, 2006 (gmt 0)

10+ Year Member



<!--#include file ="admindbcommands.asp"-->
<script language="javascript" type="text/javascript">
function limitText(limitField, limitCount, limitNum) {
if (limitField.value.length > limitNum) {
limitField.value = limitField.value.substring(0, limitNum);
} else {
limitCount.value = limitNum - limitField.value.length;
}
}
function noenter() {
return!(window.event && window.event.keyCode == 13); }
</script>
<%
Testid = Request.QueryString("TestID")

'<!------------------------------------------------------------->
if testID <> "" then
connect()
strSQL="SELECT * FROM TestGroups INNER JOIN TestTitles ON TestGroups.TestGroupID = TestTitles.TestGroupID_FKey where TestID=" & Testid & ";"
set objrs=server.CreateObject("ADODB.recordset")
objrs.open strSql, objConn

strSQL="SELECT * from TestGroups;"
set objrs2=server.CreateObject("ADODB.recordset")
objrs2.open strSql, objConn

TestPassage=replace(objrs.fields("testpassage"),"vbcrlf","<br")
%>

<form name="form1" method="post" action="edittest.asp?action=UpdateQuestions">
<input type="hidden" name="TESTID" value="<%=Testid%>">
Test Group:
<select name="TestGroupID">
<%do while not objrs2.eof%>
<option <%if objrs.fields("TestGroup")=objrs2.fields("TestGroup") then %>selected<%end if%> value="<%=objrs2.fields("TestGroupID")%>"><%=objrs2.fields("TestGroup")%></option>
<%objrs2.movenext
loop%>
</select>
<p>Test Title:
<input value="<%=objrs.fields("Testtitle")%>" onKeyPress="return noenter()" size="50" type="text" name="TestTitle" />
<br />
<br />
<table>
<tr>
<td valign="top">Material:</td>
<td><center>

<textarea name="passage" cols="100" rows="25" onKeyDown="limitText(this.form.passage,this.form.countdown,65535 );" onKeyUp="limitText(this.form.passage,this.form.countdown,65535 );"><%=testpassage%></textarea>
</center></td>
</tr>
</table>
You have
<input readonly type="text" name="countdown" size="3" value="65535">
characters left.</font>
<input type="submit" value="Next >>" NAME="Submit1" ID="Submit1">
</form>
<%disconnect()
end if%>

here is admindbcommands.asp

Dim objConn
'objects
Set objConn = Server.CreateObject("ADODB.Connection")

''''''''''''''''''''''''''''''''
' Connects to database
'
''''''''''''''''''''''''''''''''
Function Connect()

objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data Source=" & Server.Mappath("../OnlineTesting.mdb") & ";"

End Function

Here is the code, tell me what's wrong!
Getting the error at line 13 of the admindbcommands.asp page object required:objConn.

Everything on the page seems to work fine, but this show up at the bottom.

jefferson

3:21 pm on Mar 21, 2006 (gmt 0)

10+ Year Member



Nevermind I found the problem. Thanks though to anyone who actuall looked at this.