[求助]想请教一个问题,请帮忙
我想问一个问题,我用一个表格输出从数据库中检索到的相关内容,但是只能出现一条,当检索到的有数据有重复时,也只能显示一我想让其出现多条记录,应该怎么改?(我是想改成当有2条以上重复记录时在页面上会显示下一条的提示,点下一条就可以看下一条记录),请大家帮帮忙,谢谢,说一下大概的思路也可以我的源代码如下:
Sub Dwclient1_CallerIDComing(CallerID,ConnectStr)
m_InCallRef = 1
m_CallerID = ""
m_InboundCallTime = Now()
m_CallerID = CallerID
DialNumber.value = m_CallerID
m_CallLogID = InsertCallLog(time(), m_CallerID, "")
ExtStatus.innerHTML = CallerID + "来电"
Dim conn
Set Conn = CreateObject("ADODB.Connection")
conn.open "DRIVER={SQL Server};SERVER=192.168.0.100;DATABASE=aaa;UID=sa;PWD=aaa"
strSql = "SELECT * FROM DW_CUSTOMER where CUS_MOBILE = '" & CallerID & "' or CUS_PHONE = '" & CallerID & "'"
set rstData = DataToRsStatic(conn, strSql)
if (rstData.BOF and rstData.EOF) Then
nam.innerHTML="无记录"
else
Do Until rstData.EOF
dim cusname
cusname = rstData("CUS_NAME")
dim phone
telphone = rstData("CUS_PHONE")
dim a
a = rstData("CUS_MOBILE")
dim unit
unit = rstData("CUS_UNIT")
dim address
address = rstData("CUS_ADDRESS")
nam.innerHTML=cusname
tel.innerHTML=telphone
mob.innerHTML=a
com.innerHTML=unit
add.innerHTML=address
Loop
End if
rstData.Close
Set rstData = nothing
conn.close
Set conn=Nothing