Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Project slowing down

Status
Not open for further replies.

flaviooooo

Programmer
Feb 24, 2003
496
FR
Hi,

I have an ADP-program that has a rather annoying feature.

After some time, everything starts going slower. Tabbing from 1 field to another will take up to 20 seconds and opening reports takes forever.

When you open the project the first time, it works pretty fast.

What can cause this and more importantly: how can I solve this?

I'm guessing it has something to do with memory management, but I have no clue on how to solve an issue like this?

Thanks in advance
 
Sounds like a memory leak.

Look for recordset objects, command objects, and connection objects that you created, set to something on the server, and then never set to "nothing" or closed.

for example:

BAD:
Begin Sub
Dim rs as new adodb.recordset
Set rs = CurrentProject.Connection.Execute("myStoredProc.")
End Sub

Good:
Begin Sub
Dim rs as new adodb.recordset
Set rs = something
Set rs = nothing
End Sub

also good:
Begin Sub
Dim rs as new adodb.recordset
Set rs = something
rs.open
rs.close
set rs = nothing

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top