我想可以这样一试,如:
对10个身份证号码进行批量查询,分别为a,b,c,d,e,f,g,h,i,j。查询时就将这10个号码以“,”分隔赋值给一个变量number,即
dim number,a,b
redim D_number(i)
number=a,b,c,d,e,f,g,h,i,j
D_number=split(number,",")
a=0;b=0
for i=0 to ubound(D_number)
mark=D_number(i)
set rs=server.createobject("adodb.recordset")
sql=select * from [user] where idcard="mark"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
a=a+","+rs("idcard")
else
b=b+","+rs("idcard")
end if
next
rs.close
set rs=nothing
response.write a&"这些身份证号码不存在!"
response.write "<br>"
response.write b&"这些身份证号码存在!"
以上可能会有一些小的错误,呵呵,都是初学,难免,希望对你有帮助!