%
\'以下连接数据库,建立一个Connection对象实例dbDimdb
Setdb=Server.CreateObject(\"ADODB.Connection\")
db.Open\"Dbq=\"Server.Mappath(\"db1.mdb\")\";Driver={MicrosoftAccessDriver(*.mdb)}\"
\'以下建立记录集
DimstrSql,rs
strSql=\"Selecttop10000*Fromeeds\"
Setrs=db.Execute(strSql)
\'以下显示数据库记录FunctionShuzi(num)
n=left(num,1)
t=0
ForI=1Tolen(num)
ifn=mid(num,i,1)then
t=t1
else
n=mid(num,i,1)
t=0
endif
ift=3then
Shuzi=True
exitfor
Endif
next
ift=3then
Shuzi=True
else
Shuzi=false
Endif
ENDFunction
%tableborder=\"1\"align=\"center\"
%
DoWhileNotrs.Eof\'只要不是结尾就执行循环
ifShuzi(rs(\"num\"))then
%
tr
td%=rs(\"id\")%/td
td%=rs(\"num\")%/td
/tr
%
endif
rs.MoveNext\'将记录指针移动到下一条记录
Loop
%
/table注:没有测试过,函数基本上完成了,需要你自己调试一下
|