Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/asp.net-mvc-3/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp classic asp'[字符串:“从订单中选择*”]_Asp Classic - Fatal编程技术网

Asp classic asp'[字符串:“从订单中选择*”]

Asp classic asp'[字符串:“从订单中选择*”],asp-classic,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

大家好,我有一些代码的问题,我找不到错误

  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)

你的绳子上没有星星。尝试:

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

你的绳子上没有星星。尝试:

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

您得到了什么错误?您的sql字符串错误。但是你没有告诉我们关于你的代码的任何错误。在SO中,您需要更加具体。当您调试这样的查询时,通常最好输入响应。在执行查询的行之前写入sql行,这样您就可以看到失败的实际查询。您得到了什么错误?您的sql字符串是错误的。但是你没有告诉我们关于你的代码的任何错误。在SO中,您需要更加具体。在调试这样的查询时,通常最好将其放入响应中。在执行查询的行之前写入sql行,以便可以看到失败的实际查询