By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,318 Members | 2,107 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,318 IT Pros & Developers. It's quick & easy.

Access 2007 Unable to Compact Database

P: n/a
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
Jan 9 '08 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Access 2007 does not support replication.

-Ed
"ISUTri" <Gr*****@gmail.comwrote in message
news:f7**********************************@s8g2000p rg.googlegroups.com...
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

Jan 13 '08 #2

P: n/a
"Ed Robichaud" <ed*********@wdn.comwrote in news:478997f2$0$26900
$2*******@news.wdn.com:
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."

Jan 13 '08 #3

P: n/a
On Jan 9, 5:23 pm, ISUTri <Grab...@gmail.comwrote:
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
Jan 13 '08 #4

P: n/a
On Jan 13, 1:20*pm, lyle <lyle.fairfi...@gmail.comwrote:
On Jan 9, 5:23 pm, ISUTri <Grab...@gmail.comwrote:


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
Mar 6 '08 #5

P: n/a
On Mar 6, 2:33*pm, ISUTri <Grab...@gmail.comwrote:
On Jan 13, 1:20*pm, lyle <lyle.fairfi...@gmail.comwrote:


On Jan 9, 5:23 pm, ISUTri <Grab...@gmail.comwrote:
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.
Mar 6 '08 #6

This discussion thread is closed

Replies have been disabled for this discussion.