?
Solved

ADODC disconnect, clean up

Posted on 2003-03-20
2
Medium Priority
?
336 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
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month9 days, 14 hours left to enroll

569 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