Access object not cleared from memory
Access object not cleared from memory
Access object not cleared from memory
Access object not cleared from memory
Access object not cleared from memory
Access object not cleared from memory Access object not cleared from memory Access object not cleared from memory Access object not cleared from memory Access object not cleared from memory Access object not cleared from memory Access object not cleared from memory Access object not cleared from memory
Access object not cleared from memory Access object not cleared from memory
Access object not cleared from memory
Go Back  Xtreme Visual Basic Talk > > > > Access object not cleared from memory


Reply
 
Thread Tools Display Modes
  #1  
Old 01-05-2004, 02:50 AM
raiye raiye is offline
Regular
 
Join Date: Aug 2003
Posts: 57
Default Access object not cleared from memory


I am using the following code to open a report from MS Access and display it as a word document. The code works properly but the MS ACCESS object is not getting release from memory when I look in the Task Manager. I tried to use GetObject instead of CreateObject but even that was not helping out. Someone please help me.

The code is as follows:

Code:
Public Function OpenReport(mReportName As String, mPreview As String, blnViewOrPrint As Boolean) Const acFormatRTF = "Rich Text Format (*.rtf)" Const acOutputReport = 3 Dim db As Object 'temporary object Dim accrpt As Object Set accrpt = CreateObject("Access.Application") 'set time out to 50 seconds 04.01.2004 App.OleRequestPendingTimeout = 50000 'to open password protected database 04.01.2004 Set db = accrpt.Application.DBEngine.Workspaces(0).OpenDatabase(App.Path & "\capitationmodell_präsentation_access_2000.mdb", 0, False, ";pwd=joel.kathrin") accrpt.OpenCurrentDatabase App.Path & "\capitationmodell_präsentation_access_2000.mdb", False accrpt.DoCmd.RunMacro "Makro_Bericht_Anzeigen", 1 If blnViewOrPrint = True Then 'print the report accrpt.DoCmd.PrintOut Else 'output to rtf format accrpt.DoCmd.OutputTo 3, "Capitation Berechnung", acFormatRTF, "c:\Capitation Berechnung.doc", True End If accrpt.Quit Set db = Nothing Set accrpt = Nothing Exit Function End Function

Last edited by Deadalus; 01-05-2004 at 05:00 AM. Reason: Added vb tags.
Reply With Quote
  #2  
Old 01-05-2004, 05:30 AM
Timbo's Avatar
TimboAccess object not cleared from memory Timbo is offline
Green-Eyed

Super Moderator
* Guru *
 
Join Date: May 2001
Location: Bangkok, Thailand
Posts: 10,261
Default

Does the problem always occur, or only when you output the file with the 'OutputTo' method?..
__________________
"He's not the Messiah. He's a very naughty boy!" - Brian's mum

Can't find the answer? >> Try something new!
Become a Professional
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use Direct Memory Access to do Graphics BillSoo Tutors' Corner 3 07-11-2005 05:41 PM
File System Object (Code for the masses) Aquila General 2 07-25-2003 10:10 AM
Access FileDialog object Raistlen38 Database and Reporting 11 07-22-2003 06:22 PM
calling a query object from Access Small Mind Database and Reporting 1 05-15-2003 03:25 PM
Object memory: when is it really allocated and released? Smokefox66 General 1 02-28-2002 07:29 PM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Access object not cleared from memory
Access object not cleared from memory
Access object not cleared from memory Access object not cleared from memory
Access object not cleared from memory
Access object not cleared from memory
Access object not cleared from memory Access object not cleared from memory Access object not cleared from memory Access object not cleared from memory Access object not cleared from memory Access object not cleared from memory Access object not cleared from memory
Access object not cleared from memory
Access object not cleared from memory
 
Access object not cleared from memory
Access object not cleared from memory
 
-->