dbTalk Databases Forums  

Access 2007 Unable to Compact Database

comp.databases.ms-access comp.databases.ms-access


Discuss Access 2007 Unable to Compact Database in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ISUTri
 
Posts: n/a

Default Access 2007 Unable to Compact Database - 01-09-2008 , 04:23 PM






We are currently converting from Access 2003 to Access 2007. I have
an Access app that is going to be very difficult to convert. This App
is used by people that are out in the field and are a long distance
from where our Access Databases are. So that is why we have
Replication set up. So they have a local copy that they can replicate
to our copies when they are in a high speed area. Since they have
data on their local laptop we use VBA code to compact these
databases. This code is

DBEngine.CompactDatabase "C:\Source.mdb", "c:\SourceTmp.mdb"

The error I receive is:
Error 3251
Operation is not supported for this type of object.
Position = 2

Any help would be appreciated.

Thanks,
Jon

Reply With Quote
  #2  
Old   
Ed Robichaud
 
Posts: n/a

Default Re: Access 2007 Unable to Compact Database - 01-12-2008 , 10:47 PM






Access 2007 does not support replication.

-Ed


"ISUTri" <GraberJ (AT) gmail (DOT) com> wrote

Quote:
We are currently converting from Access 2003 to Access 2007. I have
an Access app that is going to be very difficult to convert. This App
is used by people that are out in the field and are a long distance
from where our Access Databases are. So that is why we have
Replication set up. So they have a local copy that they can replicate
to our copies when they are in a high speed area. Since they have
data on their local laptop we use VBA code to compact these
databases. This code is

DBEngine.CompactDatabase "C:\Source.mdb", "c:\SourceTmp.mdb"

The error I receive is:
Error 3251
Operation is not supported for this type of object.
Position = 2

Any help would be appreciated.

Thanks,
Jon



Reply With Quote
  #3  
Old   
lyle fairfield
 
Posts: n/a

Default Re: Access 2007 Unable to Compact Database - 01-13-2008 , 12:44 PM



"Ed Robichaud" <edrobichaud (AT) wdn (DOT) com> wrote in news:478997f2$0$26900
$2ff6ac69 (AT) news (DOT) wdn.com:

Quote:
Access 2007 does not support replication.

-Ed
A DB in the ACCDB file format is not replicable. But MS claims that Access
2007 can replicate older file versions.

from http://office.microsoft.com/en-us/ac...484061033.aspx

"You cannot convert a replicated database to the Office Access 2007 file
format. However, you can use Access 2007 to create a replica of a database
that is formatted in either the Access 2000 or the Access 2002 - 2003 file
format."

from Access 2007 Help:

"Office Access 2007 employs a new file format that supports a number of
product enhancements. When you create a new database in Access 2007, the
database uses the new file format by default and is given the .accdb file
extension.

You should use the new file format whenever possible because it supports
new features, such as multivalued fields and attachments. However, the new
file format cannot be opened or linked to with earlier versions of Access,
it does not support replication, and it does not support user-level
security. If you need to use the database with earlier versions of Access,
or if you need to use replication or user-level security, you must use an
earlier version file format."





Reply With Quote
  #4  
Old   
lyle
 
Posts: n/a

Default Re: Access 2007 Unable to Compact Database - 01-13-2008 , 01:20 PM



On Jan 9, 5:23 pm, ISUTri <Grab... (AT) gmail (DOT) com> wrote:
Quote:
We are currently converting from Access 2003 to Access 2007. I have
an Access app that is going to be very difficult to convert. This App
is used by people that are out in the field and are a long distance
from where our Access Databases are. So that is why we have
Replication set up. So they have a local copy that they can replicate
to our copies when they are in a high speed area. Since they have
data on their local laptop we use VBA code to compact these
databases. This code is

DBEngine.CompactDatabase "C:\Source.mdb", "c:\SourceTmp.mdb"

The error I receive is:
Error 3251
Operation is not supported for this type of object.
Position = 2

Any help would be appreciated.

Thanks,
Jon
In Access 2007 this works for me. ffdbabooks.mdb is in 2002 format.

Sub temp()
DBEngine.CompactDatabase "ffdbabooks.mdb", "temp.mdb"
End Sub


Reply With Quote
  #5  
Old   
ISUTri
 
Posts: n/a

Default Re: Access 2007 Unable to Compact Database - 03-06-2008 , 02:33 PM



On Jan 13, 1:20*pm, lyle <lyle.fairfi... (AT) gmail (DOT) com> wrote:
Quote:
On Jan 9, 5:23 pm, ISUTri <Grab... (AT) gmail (DOT) com> wrote:





We are currently converting from Access 2003 to Access 2007. *I have
an Access app that is going to be very difficult to convert. *This App
is used by people that are out in the field and are a long distance
from where our Access Databases are. *So that is why we have
Replication set up. *So they have a local copy that they can replicate
to our copies when they are in a high speed area. *Since they have
data on their local laptop we use VBA code to compact these
databases. *This code is

DBEngine.CompactDatabase "C:\Source.mdb", "c:\SourceTmp.mdb"

The error I receive is:
Error 3251
Operation is not supported for this type of object.
Position = 2

Any help would be appreciated.

Thanks,
Jon

In Access 2007 this works for me. ffdbabooks.mdb is in 2002 format.

Sub temp()
DBEngine.CompactDatabase "ffdbabooks.mdb", "temp.mdb"
End Sub- Hide quoted text -

- Show quoted text -
Thanks for your help. I managed to get the compact to work Using
this:

RepairDatabase = _
Application.CompactRepair( _
LogFile:=True, _
SourceFile:="c:\data\Test.mdb", _
DestinationFile:="c:\data\TestTmp.mdb")

But my replication still isn't working. I'm using Access 2007 but the
database is still in the Access 2003 file format.

My Sync Code is as follows:

Set db = DBEngine(0).OpenDatabase("C:\data\testReplica.mdb" )
strSyncTargetDB = "\\server\ServerReplica.mdb"

db.Synchronize strSyncTargetDB, dbRepImpExpChanges
db.Close


Reply With Quote
  #6  
Old   
ISUTri
 
Posts: n/a

Default Re: Access 2007 Unable to Compact Database - 03-06-2008 , 04:44 PM



On Mar 6, 2:33*pm, ISUTri <Grab... (AT) gmail (DOT) com> wrote:
Quote:
On Jan 13, 1:20*pm, lyle <lyle.fairfi... (AT) gmail (DOT) com> wrote:





On Jan 9, 5:23 pm, ISUTri <Grab... (AT) gmail (DOT) com> wrote:

We are currently converting from Access 2003 to Access 2007. *I have
an Access app that is going to be very difficult to convert. *This App
is used by people that are out in the field and are a long distance
from where our Access Databases are. *So that is why we have
Replication set up. *So they have a local copy that they can replicate
to our copies when they are in a high speed area. *Since they have
data on their local laptop we use VBA code to compact these
databases. *This code is

DBEngine.CompactDatabase "C:\Source.mdb", "c:\SourceTmp.mdb"

The error I receive is:
Error 3251
Operation is not supported for this type of object.
Position = 2

Any help would be appreciated.

Thanks,
Jon

In Access 2007 this works for me. ffdbabooks.mdb is in 2002 format.

Sub temp()
DBEngine.CompactDatabase "ffdbabooks.mdb", "temp.mdb"
End Sub- Hide quoted text -

- Show quoted text -

Thanks for your help. *I managed to get the compact to work Using
this:

* * * * RepairDatabase = _
* * * * * * Application.CompactRepair( _
* * * * * * LogFile:=True, _
* * * * * * SourceFile:="c:\data\Test.mdb", _
* * * * * * DestinationFile:="c:\data\TestTmp.mdb")

But my replication still isn't working. *I'm using Access 2007 but the
database is still in the Access 2003 file format.

My Sync Code is as follows:

* * Set db = DBEngine(0).OpenDatabase("C:\data\testReplica.mdb" )
* * strSyncTargetDB = "\\server\ServerReplica.mdb"

* * db.Synchronize strSyncTargetDB, dbRepImpExpChanges
* * db.Close- Hide quoted text -

- Show quoted text -
BTW, the Replication works if I do it manually. However, I'm looking
for a VBA way to do this since this would be easiest on the users.


Reply With Quote
Reply




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

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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.