Jeanne Boyarsky wrote:See NotACodeMill for why nobody is going to provide the relevant code.
To start out, draw on paper what you might show on the screen. There isn't one right answer to this. Just try. If you have specific questions, folks here will help. But they will not do your homework assignment for you.
Thanks for replying ..I have just made the same module but its not working the way i want it to work.
I have made table in access named one field as date of type
string but when i m using between query to fetch record between dates i am geeting wrong output..I may show you the code
<% String name=(String)session.getAttribute("username");
String classId=request.getParameter("n1");
String from=request.getParameter("T4");
String to=request.getParameter("T5");
if(name!=null )
{
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:School_mgmt");
String sql1="SELECT * FROM Attendance_Record WHERE ClassID='"+classId+"' AND DateofAtt BETWEEN '"+from+"' AND '"+to+"' ";
// out.print(sql1);
Statement stmt1=con.createStatement();
ResultSet rs=stmt1.executeQuery(sql1);
%>
the table is displayed in this form
Date |
Student ID |
Student Name |
Status |
<%
while(rs.next())
{
//java.util.Date a=rs.getDate(5);
String a=rs.getString(5);
String b=rs.getString(1);
String c=(String)rs.getString(2);
String d=(String)rs.getString(3);
%>
<%=a%> |
<%=b%> |
<%=c%> |
<%=d%> |
<% }%>
Now can you please help me..Thanks