Dim RS
Set Conn = Server.CreateObject("ADODB.Connection")
Set RS = Server.CreateObject("ADODB.Recordset")
Conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("forum.mdb") & ";"
Conn.Open
SQL = "SELECT * FROM profile"
RS.Open SQL, Conn
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Youth Aloud!Forum</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
#content {
margin-right:1%;
margin-left:1%;
margin-top:5%;
padding-bottom:10px;
background:#fff;
border:2px solid #ffaf38;
text-align:left;
min-width:600px;
}
</style>
</head>
<body>
<table width="650" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFAF38" bgcolor="#FFFFFF" >
<!--DWLayoutTable-->
<tr>
<td height="28" colspan="3" valign="top"><!--DWLayoutEmptyCell--> </td>
</tr>
<tr>
<td height="50" colspan="3" align="center" valign="center"><img src="Exported/profilelogo.gif" width="650" height="50"></td>
</tr>
<tr>
<td width="438" height="29" align="right" valign="center">Search the forum:
</td>
<form name="form1" method="post" action="">
<td width="160" align="right" valign="center">
<input type="text" name="textfield"> </td>
<td width="69" align="center"valign="center">
<input type="submit" name="Submit" value="Search">
</td>
</form>
</tr>
</table>
<table width="650" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" align="center">
<!--DWLayoutTable-->
<tr>
<td width="650" height="300" valign="top" border="2" bordercolor="#FF9900"><div id="content">
<p>Name:
<input name="Name" type="text" value= " <% response.write(RS("Name"))%> ">
</p>
<p>Age:
<input name="Age" type="text" value= " <% response.write(RS("Age"))%> ">
</p>
<p>Gender:
<input name="Gender" type="text" value= " <% response.write(RS("Gender"))%> ">
</p>
<p>Website:
<input name="Website" type="text" value= " <% response.write(RS("Website"))%> ">
</p>
<p> MSN:
<input name="Msn" type="text" value= " <% response.write(RS("Msn"))%> ">
</p>
<p>Yahoo:
<input name="Yahoo" type="text" value= " <% response.write(RS("Yahoo"))%> ">
</p>
<p>Occupation:
<input name="Occupation" type="text" value= " <% response.write(RS("Occupation"))%> ">
</p>
<p> </p>
<form name="form2" method="post" action="updatesuc.asp">
<input type="submit" name="Submit" value="Submit">
</form>
</div></td>
</tr>
</table>
</body>
</html>
<%
RS.Close
Set RS = Nothing
Conn.Close
Set Conn = Nothing
%>
The above code is my code. It was perfectly fine at 1st...After running for a few times, an error occured...i cannot solve it... :'( This happened to my previous code too..I redo my code and this time it's happening again..may i know what is the prob???
Script error detected at line 61.
Source line: response.write(RS("Name"))
Description: Type mismatch: 'Response.Write'
Thanks in advance!
Feb 4 2006, 04:01 AM, updated 20y ago
Quote
0.0136sec
1.62
6 queries
GZIP Disabled