ASP代码: <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%Session.CodePage=936%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title> 无标题文档 </title> </head>
<body>
<% dim conn
dim connstr
on error resume next
connstr="Driver={SQL Server};Server=192.168.0.101;UID=sa;PWD=mjt_0755;Database=GQBD"
set conn=server.createobject("ADODB.CONNECTION")
set Rs=Server.CreateObject("ADODB.RecordSet")
conn.open connstr
//sql="select CONVERT(varchar(12) , T_his_submit.d_logdate, 102 ) as d_date , s_mobilecode,(t_his_sm.s_sm)as s_sm,s_MsgContent from T_his_submit left join t_his_sm on T_his_submit.n_oldid = t_his_sm.n_oldid order by T_his_submit.d_logdate desc"
strsql = "select CONVERT(varchar(12) , T_his_submit.d_logdate, 102 ) as d_date , t_his_sm.s_mobilecode,t_his_sm.s_sm,s_MsgContent,n_code from ((T_his_submit left join T_his_sm on T_his_submit.n_oldid = T_his_sm.n_oldid)left join t_submit_report on T_his_submit.s_id_FromMOID= t_submit_report.s_id_FromMOID)left join t_errsm on T_his_submit.n_oldid = t_errsm.n_oldid order by d_date desc"
//strsql= "select * from t_initsm order by d_date desc"
rs.open strsql,conn,1,3
%>
<table class="news_table" cellpadding="0" cellspacing="0">
<thead>
<tr>
<td width="150" height="25"> Time </td>
<td width="100"> MoblieCode </td>
<td width="200"> SM </td>
<td width="233"> Worked </td>
<td width="169"> The State的 of Sending </td>
</tr>
</thead>
<tbody>
<%
//---获取结构填充表格---
response.charset = "gb2312"
if rs.bof and rs.eof then
response.Write("no record")
else
while not rs.eof
response.Write(" <tr> ")
response.Write(" <td> "&rs("d_date") &" </td> ")
response.Write(" <td> "&rs("s_mobilecode")&" </td> ")
response.Write(" <td> "&rs("s_sm")&" </td> ")
response.Write(" <td> "&rs("s_MsgContent")& " </td> ")
response.Write(" <td> "&rs("n_code")& " </td> ")
response.Write(" </tr> ")
rs.movenext
wend
end if
//---获取结构填充表格-
%>
</tbody>
</table>
<%
//为了每次调用这个面可以看到更新的结果集,特意在每次调用本页时添加一条记录
//rs.addNew
//rs("title")=now()&"--title"
//rs("ower")=request.QueryString("timestamp")
//rs("content")="--content"&now()
//rs.update
//释放资源
rs.close
set rs=nothing
conn.close
set conn=nothing
%> </body>
</html>
<%Session.CodePage=936%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title> 无标题文档 </title> </head>
<body>
<% dim conn
dim connstr
on error resume next
connstr="Driver={SQL Server};Server=192.168.0.101;UID=sa;PWD=mjt_0755;Database=GQBD"
set conn=server.createobject("ADODB.CONNECTION")
set Rs=Server.CreateObject("ADODB.RecordSet")
conn.open connstr
//sql="select CONVERT(varchar(12) , T_his_submit.d_logdate, 102 ) as d_date , s_mobilecode,(t_his_sm.s_sm)as s_sm,s_MsgContent from T_his_submit left join t_his_sm on T_his_submit.n_oldid = t_his_sm.n_oldid order by T_his_submit.d_logdate desc"
strsql = "select CONVERT(varchar(12) , T_his_submit.d_logdate, 102 ) as d_date , t_his_sm.s_mobilecode,t_his_sm.s_sm,s_MsgContent,n_code from ((T_his_submit left join T_his_sm on T_his_submit.n_oldid = T_his_sm.n_oldid)left join t_submit_report on T_his_submit.s_id_FromMOID= t_submit_report.s_id_FromMOID)left join t_errsm on T_his_submit.n_oldid = t_errsm.n_oldid order by d_date desc"
//strsql= "select * from t_initsm order by d_date desc"
rs.open strsql,conn,1,3
%>
<table class="news_table" cellpadding="0" cellspacing="0">
<thead>
<tr>
<td width="150" height="25"> Time </td>
<td width="100"> MoblieCode </td>
<td width="200"> SM </td>
<td width="233"> Worked </td>
<td width="169"> The State的 of Sending </td>
</tr>
</thead>
<tbody>
<%
//---获取结构填充表格---
response.charset = "gb2312"
if rs.bof and rs.eof then
response.Write("no record")
else
while not rs.eof
response.Write(" <tr> ")
response.Write(" <td> "&rs("d_date") &" </td> ")
response.Write(" <td> "&rs("s_mobilecode")&" </td> ")
response.Write(" <td> "&rs("s_sm")&" </td> ")
response.Write(" <td> "&rs("s_MsgContent")& " </td> ")
response.Write(" <td> "&rs("n_code")& " </td> ")
response.Write(" </tr> ")
rs.movenext
wend
end if
//---获取结构填充表格-
%>
</tbody>
</table>
<%
//为了每次调用这个面可以看到更新的结果集,特意在每次调用本页时添加一条记录
//rs.addNew
//rs("title")=now()&"--title"
//rs("ower")=request.QueryString("timestamp")
//rs("content")="--content"&now()
//rs.update
//释放资源
rs.close
set rs=nothing
conn.close
set conn=nothing
%> </body>
</html>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货