2 Replies Latest reply on Nov 13, 2008 7:32 AM by cr4zycr4y0n

    dw cs3 error

    Level 7
      i am trying to delete multiple checkbox and i have done a command procedure
      but it gives me error pls help.

      here is my code

      <%
      Dim Command1__@@varName@@
      Command1__@@varName@@ = "@@defaultValue@@"
      If (@@runtimeValue@@ <> "") Then
      Command1__@@varName@@ = @@runtimeValue@@
      End If
      %>
      <%

      Set Command1 = Server.CreateObject ("ADODB.Command")
      Command1.ActiveConnection = MM_toshee_STRING
      Command1.CommandText = "DELETE * FROM product WHERE link_id IN (?)"
      Command1.Parameters.Append Command1.CreateParameter("varlinkid", 5, 1, 100,
      MM_IIF(request.form("link_id"), request.form("link_id"), Command1__varlinkid
      & ""))
      Command1.CommandType = 1
      Command1.CommandTimeout = 0
      Command1.Prepared = true
      Command1.Execute()

      %>

      i used this query : delete * from products where link_id IN (varlinkid)

      pls help
      aj
      regds
      r


        • 1. Re: dw cs3 error
          Level 7
          Rajiv Vaishnav wrote:
          > i am trying to delete multiple checkbox and i have done a command procedure
          > but it gives me error pls help.
          >
          > here is my code
          >
          > <%
          > Dim Command1__@@varName@@
          > Command1__@@varName@@ = "@@defaultValue@@"
          > If (@@runtimeValue@@ <> "") Then
          > Command1__@@varName@@ = @@runtimeValue@@
          > End If
          > %>
          > <%
          >
          > Set Command1 = Server.CreateObject ("ADODB.Command")
          > Command1.ActiveConnection = MM_toshee_STRING
          > Command1.CommandText = "DELETE * FROM product WHERE link_id IN (?)"
          > Command1.Parameters.Append Command1.CreateParameter("varlinkid", 5, 1, 100,
          > MM_IIF(request.form("link_id"), request.form("link_id"), Command1__varlinkid
          > & ""))
          > Command1.CommandType = 1
          > Command1.CommandTimeout = 0
          > Command1.Prepared = true
          > Command1.Execute()
          >
          > %>
          >
          > i used this query : delete * from products where link_id IN (varlinkid)

          Commands are broken in CS3, and probably CS4, its a known bug, and the
          only work around is to do it by hand or use a stored procedure within a
          Recordset.

          Dooza

          --
          Posting Guidelines
          http://www.adobe.com/support/forums/guidelines.html
          How To Ask Smart Questions
          http://www.catb.org/esr/faqs/smart-questions.html
          • 2. Re: dw cs3 error
            cr4zycr4y0n
            thats a bug in dreamweaver .. if you pick it a part you will see what its trying to do.. i think below is what your looking for..

            <%
            Dim Command1__varlinkid
            Command1__varlinkid = "1" 'enter your default value here
            If (request.form("link_id") <> "") Then
            Command1__varlinkid = request.form("link_id")
            End If
            %>