When you open a connection to do queries in ASP you use a Close
statement at the end which should kill that connection so it is not open
anymore for that request. So your theory is correct. I'm sure there are
times when this may not work and it could go into some infinite loop but
it should close. Here is some example code, You'll notice the
MyRecordset2.Close and MyConnection2.Close statements

Ben



<code>

If Session("Authenticated") = 1 Then

Dim MyConnection2
Set MyConnection2 = Server.CreateObject("ADODB.Connection")
Call MyConnection2.Open("Driver={Microsoft Access Driver
(*.mdb)};DBQ=database.mdb")

Session ("Username") = Request("gebruikersnaam")

Dim MySQLstatement2
MySQLstatement2 = "SELECT * FROM login WHERE gebruikersnaam = '" _
& Request("gebruikersnaam") & "'"

Dim MyRecordset2
Set MyRecordset2 = Server.CreateObject("ADODB.Recordset")
Call MyRecordset2.Open(MySQLstatement2, MyConnection2)

If MyRecordset2.EOF Then

MySQLstatement2 = "UPDATE QUERY HERE"
Call MyRecordset2.Close()
Call MyRecordset2.Open(MySQLstatement2, MyConnection2)

Call Response.Redirect("../../profiel.asp")

Else
Call Response.Redirect("../../login.asp")

End If

MyRecordset2.Close
MyConnection2.Close

Else
Call Response.Redirect("../../login.asp")

End If

</code>

-----Original Message-----
From: Robert Everland III [mailto:[EMAIL PROTECTED]
Sent: Monday, December 08, 2003 9:18 AM
To: CF-Community
Subject: How does ASP and CF work - need documentation

I work with someone here that thinks he knows everything. Well his
latest gospel is that for every connection to ASP it leaves the
connection open thereby eventually causing the server to crap up with
memory issues. We have a 4 processor XEON with 2.4 ghz processor, and 2
GB of Ram, I don't think it will be an issue. Regardless of this I am
pretty sure that the way that ASP and ColdFusion work is they create the
dynamic page then send it to the client, and that's it. No more open
connection, but I am not certain of this and don't  know the proper
terms to search in order to find documentation on how it really works.
Can anyone help me with this.

Bob

  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to