Calmaris
02-17-2003, 03:33 PM
How the heck am I getting type mismatch they are just text.
It won't accept the administrator name and pass, so won't redirect to admin page. If I take that segment of code out, as long as the user name and pass is in the database the page here will show.
Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch
/hunting/wwwroot/LoggedMainPics.asp, line 87
<% @Language = VBScript %>
<% Option Explicit %>
<%
Dim Hunt_Id, Hunt_Password, dbConn, dbQuery, recordsetDB, strquerystring1
Hunt_Id = request.form("OldHunt_Id")
Hunt_Password = request.form("Hunt_Password")
If IsObject(Session("users_dbConn") ) Then
Set dbConn= Session("users_dbConn")
Else
Set dbConn = Server.CreateObject("ADODB.Connection")
Call dbConn.Open ("Appdb1","Anyone","Anyone")
Set Session("users_dbConn")= dbConn
End If
%>
<html>
<head>
<title>New Page 2</title>
<base target="_self">
<meta name="Microsoft Theme" content="cactus 111">
</head>
<body background="cactxtr.gif" bgcolor="#FFFF99" text="#003300" link="#990000" vlink="#006633" alink="#663300">
<p> <img border="0" src="northshoreadventures1logo.gif" width="364" height="160"></p>
<p> </p>
<form NAME="Login" METHOD="POST" ACTION="UpdateReg.asp">
Welcome <%=Hunt_Id%> <input type="hidden" name="OldHunt_Id" size="24" Value="<%=Hunt_Id%>">To
Change your Registration click here<input type="submit" value="GO" name="B1">
</form>
<form NAME="AddStorie" METHOD="POST" ACTION="AddStories.asp">
<input type="hidden" name="OldHunt_Id" size="24" Value="<%=Hunt_Id%>">
<input type="hidden" name="Hunt_Password" size="24" Value="<%=Hunt_Password%>">
<p><%=Hunt_Id%> Add your stories click here<input type="submit" value="GO" name="B1"></p>
</form>
<form NAME="VIEW_Storie" METHOD="POST" ACTION="View_Storie.asp">
<input type="hidden" name="OldHunt_Id" size="24" Value="<%=Hunt_Id%>">
<input type="hidden" name="Hunt_Password" size="24" Value="<%=Hunt_Password%>">
VIEW STORIES OTHER MEMBERS HAVE MADE <input type="submit" value="GO" name="view">
</form>
<p> <img border="0" src="deergun.gif" width="159" height="64">
</p>
<p><a href="Season.html">THE HUNTING SEASONS WHAT YOU CAN GET AND WHEN</a></p>
<form NAME="Comments" METHOD="POST" ACTION="Comments.asp">
<input type="hidden" name="OldHunt_Id" size="24" Value="<%=Hunt_Id%>">
<input type="hidden" name="Hunt_Password" size="24" Value="<%=Hunt_Password%>">
<p><%=Hunt_Id%> Add your comments click here<input type="submit" value="GO" name="B1"></p>
</form>
<form NAME="VIEW_comm" METHOD="POST" ACTION="View_Comments.asp">
<input type="hidden" name="OldHunt_Id" size="24" Value="<%=Hunt_Id%>">
<input type="hidden" name="Hunt_Password" size="24" Value="<%=Hunt_Password%>">
VIEW COMMENTS OTHER MEMBERS HAVE MADE <input type="submit" value="GO" name="view"></p>
</form>
</body>
</html>
<%
strquerystring1 = "SELECT Hunt_Registration.Hunt_Id, Hunt_Registration.Hunt_Password " & _
"FROM Hunt_Registration " & _
"WHERE Hunt_Registration.Hunt_Id = " &" '" & Hunt_Id & "' and Hunt_Registration.Hunt_Password = " &" '" & Hunt_Password & "' "
set recordsetDB = dbconn.execute(strquerystring1)
%>
<%
if recordsetDB.eof then
response.redirect("Nouser.html")
end if
if recordsetDB = " & Hunt_Id & " = "Administrator" and " & Hunt_Password & " = "Brad" then
response.redirect ("Admin.Asp")
end if
recordsetDB.Close
%>
It won't accept the administrator name and pass, so won't redirect to admin page. If I take that segment of code out, as long as the user name and pass is in the database the page here will show.
Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch
/hunting/wwwroot/LoggedMainPics.asp, line 87
<% @Language = VBScript %>
<% Option Explicit %>
<%
Dim Hunt_Id, Hunt_Password, dbConn, dbQuery, recordsetDB, strquerystring1
Hunt_Id = request.form("OldHunt_Id")
Hunt_Password = request.form("Hunt_Password")
If IsObject(Session("users_dbConn") ) Then
Set dbConn= Session("users_dbConn")
Else
Set dbConn = Server.CreateObject("ADODB.Connection")
Call dbConn.Open ("Appdb1","Anyone","Anyone")
Set Session("users_dbConn")= dbConn
End If
%>
<html>
<head>
<title>New Page 2</title>
<base target="_self">
<meta name="Microsoft Theme" content="cactus 111">
</head>
<body background="cactxtr.gif" bgcolor="#FFFF99" text="#003300" link="#990000" vlink="#006633" alink="#663300">
<p> <img border="0" src="northshoreadventures1logo.gif" width="364" height="160"></p>
<p> </p>
<form NAME="Login" METHOD="POST" ACTION="UpdateReg.asp">
Welcome <%=Hunt_Id%> <input type="hidden" name="OldHunt_Id" size="24" Value="<%=Hunt_Id%>">To
Change your Registration click here<input type="submit" value="GO" name="B1">
</form>
<form NAME="AddStorie" METHOD="POST" ACTION="AddStories.asp">
<input type="hidden" name="OldHunt_Id" size="24" Value="<%=Hunt_Id%>">
<input type="hidden" name="Hunt_Password" size="24" Value="<%=Hunt_Password%>">
<p><%=Hunt_Id%> Add your stories click here<input type="submit" value="GO" name="B1"></p>
</form>
<form NAME="VIEW_Storie" METHOD="POST" ACTION="View_Storie.asp">
<input type="hidden" name="OldHunt_Id" size="24" Value="<%=Hunt_Id%>">
<input type="hidden" name="Hunt_Password" size="24" Value="<%=Hunt_Password%>">
VIEW STORIES OTHER MEMBERS HAVE MADE <input type="submit" value="GO" name="view">
</form>
<p> <img border="0" src="deergun.gif" width="159" height="64">
</p>
<p><a href="Season.html">THE HUNTING SEASONS WHAT YOU CAN GET AND WHEN</a></p>
<form NAME="Comments" METHOD="POST" ACTION="Comments.asp">
<input type="hidden" name="OldHunt_Id" size="24" Value="<%=Hunt_Id%>">
<input type="hidden" name="Hunt_Password" size="24" Value="<%=Hunt_Password%>">
<p><%=Hunt_Id%> Add your comments click here<input type="submit" value="GO" name="B1"></p>
</form>
<form NAME="VIEW_comm" METHOD="POST" ACTION="View_Comments.asp">
<input type="hidden" name="OldHunt_Id" size="24" Value="<%=Hunt_Id%>">
<input type="hidden" name="Hunt_Password" size="24" Value="<%=Hunt_Password%>">
VIEW COMMENTS OTHER MEMBERS HAVE MADE <input type="submit" value="GO" name="view"></p>
</form>
</body>
</html>
<%
strquerystring1 = "SELECT Hunt_Registration.Hunt_Id, Hunt_Registration.Hunt_Password " & _
"FROM Hunt_Registration " & _
"WHERE Hunt_Registration.Hunt_Id = " &" '" & Hunt_Id & "' and Hunt_Registration.Hunt_Password = " &" '" & Hunt_Password & "' "
set recordsetDB = dbconn.execute(strquerystring1)
%>
<%
if recordsetDB.eof then
response.redirect("Nouser.html")
end if
if recordsetDB = " & Hunt_Id & " = "Administrator" and " & Hunt_Password & " = "Brad" then
response.redirect ("Admin.Asp")
end if
recordsetDB.Close
%>