这个数据库是couns考勤机自带的数据库,我都没改过,我只是连接它啊
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> <%response.Charset="gb2312"%> <!--#include file="./conn.asp"--> <% starttime=request("starttime") endtime=request("endtime") in0=trim(request("in0")) out0=trim(request("out0")) namechoice=trim(request("namechoice")) sql="update tblTurnDay_Detail set in0='"&in0&"',out0='"&out0&"',strdesc='' where 1=1 " if starttime <>"" then sql = sql& "and date0 >= #"&starttime&"# " end if if endtime <>"" then sql = sql& "and date0 <= #"&endtime&"# " end if if namechoice <>"" then sql = sql& "and cardid = '"&namechoice&"'" end if conn2.execute(sql) set rs=server.CreateObject("adodb.recordset") sql="select * from tblTurnDay_Detail where 1=1 " if starttime <>"" then sql = sql& "and date0 >= #"&starttime&"# " end if if endtime <>"" then sql = sql& "and date0 <= #"&endtime&"# " end if if namechoice <>"" then sql = sql& "and cardid = '"&namechoice&"'" end if rs.open sql,conn2,1,1 if rs.eof or rs.bof then response.Write "没有符合条件的记录" end if %> <table width="95%" border="1" align="center" bordercolor="#FFFFFF" bgcolor="#CCFFCC"> <tr> <td>姓名</td> <td>卡号</td> <td>日期</td> <td>上班时间</td> <td>下班时间</td> <td>考勤状态</td> <td>备注</td> </tr> <% for i = 1 to rs.recordcount %> <tr> <td><%=rs("cardid")%></td> <td><%=rs("cardid")%></td> <td><%=rs("date0")%></td> <td><%=rs("in0")%></td> <td><%=rs("out0")%></td> <td><%=rs("strdesc")%></td> <td> </td> </tr> <% rs.movenext if rs.eof then exit for end if next %> </table> <% 'response.Write sql rs.close set rs = nothing conn2.close set conn2 = Nothing response.Write "<script language = javascript>alert('Modify success,修改数据统计如下');</script>" %>