Talk About Network

Google





Software > Access Development Tool Kids > Re: MDF File gr...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 5 Topic 2078 of 2154
Post > Topic >>

Re: MDF File grows in size with no additional data being added

by "Douglas J. Steele" <NOSPAM_djsteele@[EMAIL PROTECTED] > Jun 13, 2008 at 06:30 AM

Afraid without knowing more about your code, I don't think anyone will be 
able to offer any suggestions as to why it grows.

It shouldn't be that difficult, though, to whip up some VBScript to run to

compare the Last Updated date of your MDB file to the current date, and
copy 
the file from the server if the file hasn't been used today. Something
like 
the following untested air-code:

Dim objFSO
Dim objWSH
Dim objLocalFile
Dim strLocalFile
Dim strLocalFolder
Dim strServerFile

  strLocalFolder = "C:\Folder\"
  strLocalFile = strLocalFolder & "File.mdb"
  strServerFile = "F:\Folder\File.mdb"

  Set objFSO = CreateObject("Scripting.FileSystemObject")
  Set objLocalFile = objFSO.GetFile(strLocalFile)
  If Month(objLocalFile.DateLastModified) < Month(Date()) _
    Or (Month(objLocalFile.DateLastModified) = Month(Date())
    And Day(objLocalFile.DateLastModified) < Day(Date())) Then

    objFSO.CopyFile strServerFile, strLocalFolder

  End If

  Set objWSH = WScript.CreateObject("WScript.Shell")
  objWSH.Run ("""C:\Program Files\Microsoft Office\Office\MSAccess.exe"" "
& 
_
    """" & strLocalFile & """")

Copy the code about into a text file (you'd usually give it a file
extension 
of .vbs). Let's say you saved it as c:\folder\startup.vbs. You'd then have
a 
shortcut that runs

wscript c:\folder\startup.vbs //nologo

instead of the current shortcut that starts your application.

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"StanMorrison via AccessMonster.com" <u44169@[EMAIL PROTECTED]
> wrote in message 
news:859a7d38631b0@[EMAIL PROTECTED]
>I am trying to solve a problem where a front-end MDB file grows and grows
> until eventually it exceeds 2 gigabytes and crashes. Compacting and 
> repairing
> slows the growth only slightly.
>
> My client is running a small Access system on a network. The front-end
MDB
> file is about 2,500k and the back-end is 26,900k located on another 
> machine
> in the network. The front-end database consists only of queries, forms,
> re****ts and Visual Basic modules. All tables are defined as links to the

> back-
> end system. It does not hold any data in tables.
>
> The front-end database sup****ts an estimating and quoting system with 
> little
> data capture. It sup****ts complex searches into the back-end database to
> interrogate previous quotations, product files etc. The quoting system
was
> created in Visual Basic by a developer who used techniques that I do not
> fully understand.
>
> Is it possible that the Visual Basic code is creating arrays or tables 
> that
> are not cleared, and that are stored ***ulatively in the MDB file?
>
> Until I find a more elegant solution, I am keeping an "original" copy on

> the
> front-end database and periodically copying it over the growing file. By

> the
> way, is there a method of reinstating this file automatically at end of 
> day?
>
> This problem persists whether I use Access 2000 or Access 2007. It also
> persists when the database is stored in 2000, 2002-3 or 2007 format.
>
> I would love to hear from anyone who might have suggestions.
>
> -- 
> Message posted via http://www.accessmonster.com
>
 




 5 Posts in Topic:
MDF File grows in size with no additional data being added
"StanMorrison via Ac  2008-06-13 08:15:16 
Re: MDF File grows in size with no additional data being added
"Douglas J. Steele&q  2008-06-13 06:30:28 
Re: MDF File grows in size with no additional data being added
"Alex Dybenko"   2008-06-13 16:23:34 
Re: MDF File grows in size with no additional data being added
"StanMorrison via Ac  2008-06-16 07:05:07 
Re: MDF File grows in size with no additional data being added
"StanMorrison via Ac  2008-06-16 07:12:57 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Wed Jan 7 18:28:32 PST 2009.