Hello i am trying to view a table But i want to only view the Data of a specific fieldset.
I collect the name of the fieldset from a form but when i try to view the data it gives me an error saying
"Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
/Trod/Report.asp, line 14
"
this is the code:
Thanks
David
I collect the name of the fieldset from a form but when i try to view the data it gives me an error saying
"Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
/Trod/Report.asp, line 14
"
this is the code:
Code:
<%@ LANGUAGE="JScript"%>
<!-- #include file="adojavas.inc" -->
<HTML>
<HEAD>
<TITLE>Admin View</TITLE>
</HEAD>
<%
var user = Request.Form("ReportView")
var conn = Server.CreateObject("ADODB.Connection");
var recordSet = Server.CreateObject("ADODB.RecordSet");
conn.Open("DSN=excuse");
recordSet.Open("select * from Details" +" where User =" + user + "",conn,adOpenKeyset,adLockOptimistic);
%>
<BODY>
<h1>REPORT FOR <%=user%></h1>
<table border="1" width="100%" bgcolor="#9999ff" bordercolor="#000000" cellpadding="3" cellspacing="3">
<tr>
<th>ID</th>
<th>First Name</th>
<th>Last Name</th>
<th>Address 1</th>
<th>Address 2</th>
<th>City</th>
<th>State</th>
<th>Zip</th>
<th>Phone Number</th>
<th>E mail Address</th>
<th>User Name</th>
<th>Password</th>
<th>Date Joined</th>
<th>Date of Birth</th>
<th>Agreed</th>
</tr>
<%
while(!recordSet.EOF)
{
%>
<tr>
<td><font size="-1"><%=recordSet("ID")%></font></td>
<td><font size="-1"><%=recordSet("FirstName")%></font></td>
<td><font size="-1"><%=recordSet("LastName")%></font></td>
<td><font size="-1"><%=recordSet("Address1")%></font></td>
<td><font size="-1"><%=recordSet("Address2")%></font></td>
<td><font size="-1"><%=recordSet("City")%></font></td>
<td><font size="-1"><%=recordSet("State")%></font></td>
<td><font size="-1"><%=recordSet("Zip")%></font></td>
<td><font size="-1"><%=recordSet("PhoneNumber")%></font></td>
<td><font size="-1"><%=recordSet("Email")%></font></td>
<td><font size="-1"><%=recordSet("User")%></font></td>
<td><font size="-1"><%=recordSet("Pass")%></font></td>
<td><font size="-1"><%=recordSet("Date")%></font></td>
<td><font size="-1"><%=recordSet("DateofBirth")%></font></td>
<td><font size="-1"><%=recordSet("Agreement")%></font></td>
</font></tr>
<%
recordSet.MoveNext();
}
recordSet.Close();
conn.Close();
%>
</script>
</table>
</BODY>
</HTML>
Thanks
David