Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 What is wrong with our test code?
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

djw
Starting Member

2 Posts

Posted - 27 June 2001 :  15:14:22  Show Profile
What is wrong with our test code?
We have a W2K server SP2 running iis5 and we use ODBC (native windows
Paradox & Merant 3.70) to access a Paradox 5 data base table called by an
ASP page. This combination yields a memory leak. We see this leak in the
ALWAYS increasing dllhost.exe "Memory Usage" until iis5 freezes. We also
notice that the "Total Handles" ALWAYS increases.
With the following ASP (See below) we have Memory leak.
With the following PHP (See below ASP) we DO NOT have Memory leak.
<%@ Language=VBScript %>
<%
Response.Buffer = True
%>


<!-- #INCLUDE FILE = "../search/Connect.inc" -->
<!-- #INCLUDE FILE = "../search/adovbs.inc" -->

<html>
<body>

<%
Dim djwRec,vI
Set djwRec = Server.CreateObject("ADODB.Recordset")
For vI = 1 to 100
djwRec.Open "SELECT * FROM Stock" ,vConn, adOpenKeyset, adLockReadOnly, adCmdText
%>
<B>Test <%=vI%></B><BR>
<%
djwRec.Close
Response.Flush
Next
Set djwRec = Nothing
vConn.Close
Set vConn = Nothing
%>

</body>
</html>


With the following PHP we DO NOT have Memory leak.
<html>
<body>

<?
//loop this much
$times = 10;

for($i = 0; $i< $times; $i++){
$connid = odbc_connect("Diamond", "", ""); //connect to the database

$result = odbc_do($connid, "SELECT * FROM Stock WHERE `Product Type` = 'D'"); //execute an SQL query

echo "$i\t: " . odbc_result($result, "Lot No") . "<br>\n"; //get some data from that query and output it

odbc_free_result($result); //free the query result's memory
odbc_close($connid); //close the database connect
}


?>

</body>
</html>


HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 27 June 2001 :  15:58:04  Show Profile  Visit HuwR's Homepage
I would say this is a problem with the paradox driver, I have tested your same code on SQL and access and do not experience any memory leak in dllhost

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.9 seconds. Powered By: Snitz Forums 2000 Version 3.4.07