?
Solved

ADODC disconnect, clean up

Posted on 2003-03-20
2
Medium Priority
?
329 Views
Last Modified: 2013-12-25
Hi,

I am writing a program in VB and am using a lot of ADODC components in my windows. I am not hardcoding any connection strings etc, but directly connecting the ADODC with my grids, fields and so on.

1.My question would be, does ADODC close its connection to the database ( I have a remote Oracle server and am using ADO, Oracle OLEDB Provider) automaticaly? If not, what it seams to be the case, how do I close the connection?

2. Does VB clean up the memory (ADODC) after I close the the window with unload me, but stay in program that is running, or do I have to manually clean up. If manually, how would I do that?

I try doing this : set Adodc1.recordset.activeconnection = nothing
and adodc1.recordset.close

For some ADODC's I get an error, for others it works!
Please help, its urgent but I have no points! :)
0
Comment
Question by:smirgla
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 190 total points
ID: 8176560
Do yourself a favor and dump the ADO data control as fast as you can.  Try coding all connections and you will have far better control.  Data Controls seem like a good idea, but fast become a nightmare with any app that is slightly more than trivial.

Anthony
0
 

Author Comment

by:smirgla
ID: 8217547
Thanks, I did dump most of the controlls, but this ADODC thing makes me dig into the think and find out how does it actually work (lifecycle).
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question