Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2003
    Posts
    23

    Unanswered: dllhost.exe and a sql select

    Ok I have never run into this before... I am leaking memory. Here is my code. The second select call makes dllhost.exe take up all of my memory. I don't understand why. Everything looks closed adn set to nothing.. any ideas?

    Code:
    <%@ Language=VBScript %>
    <HTML>
    	<HEAD>
    		<meta name="GENERATOR" Content="Microsoft Visual Studio.NET 7.0">
    	<!--#INCLUDE FILE="../HTMLSite/includes/adovbs.asp"'-->
    	</head>
    	<body>
    	
    		<% 
    set cn = Server.CreateObject("ADODB.Connection")
    set rsCustomerInfo = Server.CreateObject("ADODB.Recordset")
    cn.Open strConn
    
    Dim ProductID(151)
    Dim ProductAmount(151)
    Dim i
    i = 0
    sqlCustomer = "Select CompanyName from Customers Where CustomerID = '" & request.Form("Customer") & "'"
    response.Write(sqlCustomer)
    rsCustomerInfo = cn.Execute(sqlCustomer)
    'This goes through all of the information that is sent to the page and makes a sql statement out of it
    for each f in request.Form
    	if f <> "Customer" then
    		if isNumeric(Request.Form(f)) then
    			ProductID(i) = f
    			ProductAmount(i) = Request.Form(f)
    			'response.Write(productID(i) & " " & ProductAmount(i) & "<br>")
    			if i = 0 then
    				sqlSelect = "SELECT ProductID, Type, Sizes, Price, Color FROM vProductList Where ProductID = '" & ProductID(i) & "'"
    			end if
    			if i >= 1 then
    				sqlSelect = sqlSelect & " Or ProductID = '" & ProductID(i) & "'"
    			end if
    			i = i + 1
    		end if
    	end if
    next
    
    'response.Write(sqlSelect)
    %>
    Confirm Order For <%= rsCustomerInfo("CompanyName") %><br><br>
    <table><tr>
    <td>Product ID</td>
    <td>Type</td>
    <td>Size</td>
    <td>Price</td>
    </tr><tr>
    <%
    
    set rsCustomerInfo = nothing
    
    set rsNewOrder = Server.CreateObject("ADODB.Recordset")
    set rsNewOrder = cn.Execute(sqlSelect)
    While not rsNewOrder.EOF
    %>
    <td><%= rsNewOrder("ProductID") %></td>
    <td><%= rsNewOrder("Type") %></td>
    <td><%= rsNewOrder("Color") %></td>
    <td><%= rsNewOrder("Type") %></td>
    <%
    wend
    
    set rsNewOrder = nothing
    cn.Close()
    %>
    </tr></table>
    </body>
    </html>
    "Everything is possible, somethings are just less likely then others"

  2. #2
    Join Date
    Jul 2003
    Posts
    23

    Got it

    Ok I have been staring at code for way to long... I forgot to put in a MoveNext Command.. lesson learned... Next!
    "Everything is possible, somethings are just less likely then others"

Posting Permissions

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