Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...SQL and SQL Ser...SQL and SQL Ser...Question about leaving connections openQuestion about leaving connections open
Previous
 
Next
New Post
9/30/2010 9:42 AM
 
Coming from a windows platform application development background I am wondering how ASP handles connections to the SQL Server.
In my code I connect to the DB from various places and for various reasons. But I am not setting these objects to nothing afterwards. For instance to fill a combo box with related data from the DB:
'JOBS DROPDOWN
 'objJob = ttsController.ListTTS_JobTypes(Session("empBureauID"), Session("empCompanyID"))
 objJob = ttsController.TTS_GetJobs(Session("empBureauID"), Session("empCompanyID"), Session("CurrentEmployeeID"), sDept)
  ddlEditJob.Items.Clear()
  
If objJob.Count > 0 Then
    For Each objTTS3 As TTS_JobInfo In objJob
        Dim itemJob As New ListItem
        itemJob.Text = objTTS3.JobID.Trim & " | " & objTTS3.JobName.Trim
        ddlEditJob.Items.Add(itemJob.Text)
    Next
End If

so if the objJob is not set to nothing Does .net close it when leaving the sub?
Or am I leaving it open and therefore wasting resources and or data handles?
Will this eventually hoq up  all my SQL resources?
Is there a better (or standard) way to handle this?

Thanks


 
Previous
 
Next
HomeHomeDevelopment and...Development and...SQL and SQL Ser...SQL and SQL Ser...Question about leaving connections openQuestion about leaving connections open


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out