Cannot use parentheses when calling a Sub

前端 未结 3 864
南旧
南旧 2021-01-28 02:15

I have a Classic ASP page that contains the following code to attempt a parametised query;

<%
Set cmdEmail = Server.CreateObject(\"ADODB.Command\")
Set rsEmai         


        
3条回答
  •  执笔经年
    2021-01-28 03:12

    Did you tried just to remove those parenthesis?

    cmdEmail.CreateParameter "@ContentID", 3, 1, , Request.Form("ContentID")

    As far as I remember, that always happens when you call a function and doesn't use its return value.

    UPDATE: Seems the real problem is the line break:

    
    cmdEmail.Parameters.Append _     '' note this "_" character
        cmdEmail.CreateParameter("@ContentID", 3, 1, , Request.Form("ContentID"))

提交回复
热议问题