Re: Compressing a .mdw file
anonymous_at_discussions.microsoft.com
Date: 08/10/04
- Next message: brucebob: "Local Security Policy"
- Previous message: anonymous_at_discussions.microsoft.com: "Re: Compressing a .mdw file"
- In reply to: Jens Burup: "Re: Compressing a .mdw file"
- Next in thread: Joan Wild: "Re: Compressing a .mdw file"
- Reply: Joan Wild: "Re: Compressing a .mdw file"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 10 Aug 2004 00:04:44 -0700
Jens
I am using the DAO equivalent of your code. However the
VBA command DBEngine.CompactDatabase will not produce a
usable copy.
Further investigation has revealed that an error table
MSysCompactError is produced which contains the following
record
-1507, Could not find field 'OLDSID'., , MSysAccounts
When I look at table MSysAccounts in the original .mdw,
the OLDSID column is present, but blank. It is not present
on the compacted table.
RH
>-----Original Message-----
>
>"Roger Hampson" <anonymous@discussions.microsoft.com>
skrev i en meddelelse
>news:123f01c47b87$fdf8a9f0$a501280a@phx.gbl...
>> We have a .mdw file that has grown to 61MB. It is use
from
>> 06:00 to 20:00 every day by a large number of people. If
>> we copy it and compress it using Tools | Database
>> Utilities | Compress and Repair Database..., it creates
a
>> perfectly usable .mdw file of 520K. However, we cannot
>> replace the old one until everyone has finished using
it,
>> which is not practical as it needs doing every day. It
>> grows to over 3MB in a day.
>>
>> We decided to compress it by writing a program and using
>>
>> DBEngine.CompactDatabase SrcName:=DBName,
>> DstName:=NewDBName
>>
>> then renaming the original to x.old and renaming the new
>> one to x.mdw.
>>
>> When we try to use the new .mdw, we get the
message "Not a
>> valid account name or password."
>>
>> Any suggestions?
>>
>> RH
>
>I use this small snippet of code from an vb.net
application to compact my
>database
>Maybe this give you an idea to solve your problem.
>
>Dim jro As JRO.JetEngine
>
>jro = New JRO.JetEngine
>
>Dim OldName, NewName As String
>
> OldName = Yourpath & "Mydatabse.mdb"
>
> NewName = Yourpath & "MyTMPdatabse.mdb"
>
> Try
>
>Rename("Your path\Mydatabse.mdb","your
path\MyTMPdatabase.mdb")
>
>jro.CompactDatabase
("Provider=Microsoft.Jet.OLEDB.4.0;Password=Yourpassword;
>User ID=Your ID;Data Source= " & Yourpath
& "MyTMPdatabse.mdb ; ;Jet
>OLEDB:System database=" & Yourpath
& "YourWorkgroupFile.MDW;Jet
>OLEDB:Database Password=Yourpassword;", _
>
> "Provider=Microsoft.Jet.OLEDB.4.0;Password=Yourpas
sword;User ID=Your
>ID;Data Source= " & Yourpath & "Mydatabse.mdb;Jet
OLEDB:System database=" &
>Yourpath & " YourWorkgroupFile.MDW;Jet OLEDB:Database
>Password=Yourpassword;")
>
>
>
>Kill(Yourpath & " MyTMPdatabse.mdb")
>
>Regards
>Jens Burup
>
>
>.
>
- Next message: brucebob: "Local Security Policy"
- Previous message: anonymous_at_discussions.microsoft.com: "Re: Compressing a .mdw file"
- In reply to: Jens Burup: "Re: Compressing a .mdw file"
- Next in thread: Joan Wild: "Re: Compressing a .mdw file"
- Reply: Joan Wild: "Re: Compressing a .mdw file"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|