asp'[string:“SELECT * FROM Orders”]'

时间:2015-11-12 13:00:15

标签: asp-classic

大家好我在使用一些代码时遇到了一些问题而且我找不到错误

  sql = "select " * " from products where pic = 1 and product_code in ("

    count = ubound(codes)
    for each code  in codes
        if len(code) > 0 then
            sql = sql & "'" & code & "'"
            if i < count - 1 then sql = sql & ","
            i = i + 1
        end if
    next

    sql = sql & ")"

    set res = lo_con.execute(sql)

1 个答案:

答案 0 :(得分:4)

你没有在你的弦上加上明星。尝试:

sql = "select * from products where pic = 1 and product_code in ("