TRY:
querySQL ="SELECT * FROM person where age>=" & request("txtage") 

解决方案 »

  1.   

    将单引号去掉,因年龄是数值型,不是字符型:
    querySQL ="SELECT * FROM person where age>=" & request("txtage")
      

  2.   

    因为age是数字型的,所以不用再加'了  改为 querySQL ="SELECT * FROM person where age>="
      

  3.   

    去不去单引号无所谓,应为sql会自动转换的,主要是:request("txtage") <<===有没有值??你必须保证它返回的数字最好去到末尾的空格!!
    querySQL ="SELECT * FROM person where age>='" & request("txtage") & "'"
    set records = Server.CreateObject("ADODB.Recordset")
    records.Open querySQL,cnnDB