dim cn,rs,cmd,param1
set cn=server.createobject("adodb.connection")
set cmd=server.createobject("adodb.command")
cn.open "driver={sql server};server=***;database=*******;uid=sa;pwd=*******"
cmd.activeconnection=cn
cmd.commandtype=4
cmd.commandtext="showid"
if len(request("txtid"))=0 then
set rs=cmd.execute
else
param1=cmd.createparameter("@id",200,1,10,request("txtid"))
cmd.parameter.append param1
set rs=cmd.execute