RT
让序号能够对应表里的相应行数
<!--#include file="config.asp"-->
<!--#include file="conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="stylesheet" href="../Css/style.css" type="text/css">
<style type="text/css">
<!--
.style1 {color: #666666}
-->
</style>
<script language="vbscript" runat="server">
''''''''''''''''''''''''''''''''''''''''''''''''
Function DataToRsStatic(Conn,strSql)
Dim RsStatic
On Error Resume NexT
Set DataToRsStatic = Nothing
If Conn Is Nothing Then
Exit Function
End If
Set RsStatic = server.CreateObject("ADODB.RecordSet")
RsStatic.CursorLocation = 3
RsStatic.Open strSql,Conn,3,3
If Err.Number <> 0 Then
Exit Function
End If
set DataToRsStatic = RsStatic
End Function
</script>
</head>
<body>
<b><font face="Wingdings" style="FONT-SIZE: 12pt; WIDTH: 20px; COLOR: #666666">)</font>客户资料</b><br>
<%
Dim conn
dim phonecode
phonecode = Request.QueryString("phonecode")
Set Conn = CreateObject("ADODB.Connection")
conn.open "Provider=IBMDADB2.1;Password=didwell;Persist Security Info=True;User ID=administrator;Data Source=aa"
strSql = "SELECT * FROM T_NoteForSend where phonecode = '" & phonecode & "' or phonecode like '%" & phonecode & "' fetch first 4 rows only "
set rstData = DataToRsStatic(conn, strSql)
if rstData.eof or rstData.bof then
response.Write("<br>没有该客户资料<br>")
else
rstData.MoveFirst
Dim count
Count = rstData.recordcount
%>
<table table cellspacing=1 cellpadding=0 border=0 width="69%" bgcolor="#c3bfb3">
<tr bordercolor="#000000">
<td bgcolor="#CCCCCC" class="td-detail"><div align="left"> 序号 </div></td>
<td bgcolor="#CCCCCC" class="td-detail"><div align="left"> 信息标识 </div></td>
<td bgcolor="#CCCCCC" class="td-detail"><div align="left"> 手机号码 </div></td>
<td bgcolor="#CCCCCC" class="td-detail"><div align="left"> 短信类型 </div></td>
<td bgcolor="#CCCCCC" class="td-detail"><div align="left"> 短信内容 </div></td>
</tr>
<tr bordercolor="#000000">
<% Do While Not rstData.EOF And Count < rstData.PageSize %>
<td bgcolor="#FFFFFF"><div align="left"><%= count %></div></td>
<td bgcolor="#FFFFFF"><div align="left"><%= rstData("NoteSID") %></div></td>
<td bgcolor="#FFFFFF"><div align="left"><%= rstData("phonecode") %></div></td>
<td bgcolor="#FFFFFF"><div align="left"><%= rstData("sendType") %></div></td>
<td bgcolor="#FFFFFF"><div align="left"><%= rstData("NoteContent") %></div></td>
</tr>
<%
'rstData.movefirst
Count = Count + 1
rstData.MoveNext
Loop
%>
</table>
<%
rstData.Close
Set rstData = nothing
conn.close
Set conn=Nothing
End If
'Dim conn1,count1
'Set conn1 = ConnDataBase2()
'strSql = "SELECT * FROM T_Customerinfo"
'strSql = "SELECT * FROM T_NoteForSend fetch first 1 rows only"
'Set rstData = DataToRsStatic(conn1, strSql)
'count1 = rstData.RecordCount
%>
</body>
</html>
这是我写的,但是count后的第一个序号为4 后面的5这样下去,请问有什么办法可让其从1开始
[此贴子已经被作者于2005-11-4 14:11:44编辑过]