Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default View a variable??

    We are having some trouble and need to see what the variable is getting. How
    can we show what the variable is being populated with.I am posting the code and
    then the sql command. We are using an example of updating multiple records to a
    table using check boxes. It works great for one record, however if we choose
    more then one it does not work. So we want to capture what is going to one of
    the variables so that we can debug. I have attached the code and I have
    attached the sql statement that we are using. We want to see what is being
    captured in the updatelease_info or the param_lease variable.

    This is the sql statment:

    UPDATE TerminalData
    SET leaseNumber = 'param_info'
    WHERE termName IN ('param_lease')


    The variables are:

    if(Request.QueryString("lease_info") <> "") then updateleaseinfo__param_info =
    Request.QueryString("lease_info")

    if(Request.QueryString("update_leaseinfo") <> "") then
    updateleaseinfo__param_lease = Request.QueryString("update_leaseinfo")



    Code Below::::


    <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
    <!--#include file="Connections/cn.asp" -->
    <%

    if(Request.QueryString("lease_info") <> "") then updateleaseinfo__param_info =
    Request.QueryString("lease_info")

    if(Request.QueryString("update_leaseinfo") <> "") then
    updateleaseinfo__param_lease = Request.QueryString("update_leaseinfo")

    %>
    <%

    set updateleaseinfo = Server.CreateObject("ADODB.Command")
    updateleaseinfo.ActiveConnection = MM_cn_STRING
    updateleaseinfo.CommandText = "UPDATE TerminalData SET leaseNumber = '" +
    Replace(updateleaseinfo__param_info, "'", "''") + "' WHERE termName IN ('" +
    Replace(updateleaseinfo__param_lease, "'", "''") + "')"
    updateleaseinfo.CommandType = 1
    updateleaseinfo.CommandTimeout = 0
    updateleaseinfo.Prepared = true
    updateleaseinfo.Execute()

    %>




    <%SET updateleaseinfo = nothing
    %>

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">


    <title>Untitled Document</title>
    </head>

    <body>

    </body>
    </html>

    Gm3512 Guest

  2. Similar Questions and Discussions

    1. View-View Event Processing
      I am not getting View to View Event processing to work. I have looked through most of the Flex 2 and Flex 3 docs plus several of the Flex books to...
    2. DW Split View - Design View
      When working in DW in Split View, when the user clicks into the Design View window the view automatically updates the view if code view has changed....
    3. Standard View vs. Layout View
      view>table view joe "lilyeq" <webforumsuser@macromedia.com> wrote in message news:bfm6gt$qla$1@forums.macromedia.com... making tables. In...
    4. Code view & Layout view
      Hello all, I have a problem! I have a .htm document where I can see the code view, but I can't see anything in the Layout view. Only the tables....
    5. Wierd error when going to Design View from HTML view
      When I go from HTML view (in a webform) to Design View I get the following error: Could not open in Design view. Quote values differently inside a...
  3. #2

    Default Re: View a variable??

    Response.Write yourVar
    Response.End

    Gm3512 wrote:
    > We are having some trouble and need to see what the variable is getting. How
    > can we show what the variable is being populated with.I am posting the code and
    > then the sql command. We are using an example of updating multiple records to a
    > table using check boxes. It works great for one record, however if we choose
    > more then one it does not work. So we want to capture what is going to one of
    > the variables so that we can debug. I have attached the code and I have
    > attached the sql statement that we are using. We want to see what is being
    > captured in the updatelease_info or the param_lease variable.
    >
    > This is the sql statment:
    >
    > UPDATE TerminalData
    > SET leaseNumber = 'param_info'
    > WHERE termName IN ('param_lease')
    >
    >
    > The variables are:
    >
    > if(Request.QueryString("lease_info") <> "") then updateleaseinfo__param_info =
    > Request.QueryString("lease_info")
    >
    > if(Request.QueryString("update_leaseinfo") <> "") then
    > updateleaseinfo__param_lease = Request.QueryString("update_leaseinfo")
    >
    >
    >
    > Code Below::::
    >
    >
    > <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
    > <!--#include file="Connections/cn.asp" -->
    > <%
    >
    > if(Request.QueryString("lease_info") <> "") then updateleaseinfo__param_info =
    > Request.QueryString("lease_info")
    >
    > if(Request.QueryString("update_leaseinfo") <> "") then
    > updateleaseinfo__param_lease = Request.QueryString("update_leaseinfo")
    >
    > %>
    > <%
    >
    > set updateleaseinfo = Server.CreateObject("ADODB.Command")
    > updateleaseinfo.ActiveConnection = MM_cn_STRING
    > updateleaseinfo.CommandText = "UPDATE TerminalData SET leaseNumber = '" +
    > Replace(updateleaseinfo__param_info, "'", "''") + "' WHERE termName IN ('" +
    > Replace(updateleaseinfo__param_lease, "'", "''") + "')"
    > updateleaseinfo.CommandType = 1
    > updateleaseinfo.CommandTimeout = 0
    > updateleaseinfo.Prepared = true
    > updateleaseinfo.Execute()
    >
    > %>
    >
    >
    >
    >
    > <%SET updateleaseinfo = nothing
    > %>
    >
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    > "http://www.w3.org/TR/html4/loose.dtd">
    > <html>
    > <head>
    > <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    >
    >
    > <title>Untitled Document</title>
    > </head>
    >
    > <body>
    >
    > </body>
    > </html>
    >
    Manuel Socarras Guest

  4. #3

    Default Re: View a variable??

    Manuel thanks for the response. We were trying to do this. Were do we put the response in the code? Also should it be surrounded with <%%>

    Thanks
    Greg
    Gm3512 Guest

  5. #4

    Default Re: View a variable??

    try this:

    <%

    if(Request.QueryString("lease_info") <> "") then
    updateleaseinfo__param_info = Request.QueryString("lease_info")

    if(Request.QueryString("update_leaseinfo") <> "") then
    updateleaseinfo__param_lease = Request.QueryString("update_leaseinfo")

    Response.Write "updateleaseinfo__param_info: " & updateleaseinfo__param_info

    Response.End
    %>

    Gm3512 wrote:
    > Manuel thanks for the response. We were trying to do this. Were do we put the response in the code? Also should it be surrounded with <%%>
    >
    > Thanks
    > Greg
    Manuel Socarras Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139