Code Comments
Programming Forum and web based access to our favorite programming groups.Have created small programme to compact a database: Dim je As New JRO.JetEngine ' Compacts database Data.Mdb to Data2.mdb. je.CompactDatabase "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=C:\Dump\DataOld.Mdb", _ "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=C:\Dump\Data.Mdb" I have compacted a number of databases with this little programme and it works fine. The problem is I have one database that it will not compact and get the error: "You do not have the necessary permissions to use the '' object. Have your system administrator or the person who created this object establish the appropriate permissions for you." If this database is compacted manually through the Access-tools-database utilities-compact database it compacts fine without a problem. If I create another database with some access code in a module then run a makro when I open this database to compact it, there is no problem and the database compacts fine. Can the problem be because of some security issue. Do I need to establish some sort of connection before doing so? Can anybody shed any light on this matter.
Post Follow-up to this message[multiposted] -- Chris Hanscom MVP (Visual Basic) http://www.veign.com -- "lappy" <dbrindley@hpj.co.uk> wrote in message news:e2663ee1.0409300249.2a08c14c@posting.google.com... > Have created small programme to compact a database: > Dim je As New JRO.JetEngine > > ' Compacts database Data.Mdb to Data2.mdb. > je.CompactDatabase "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data > Source=C:\Dump\DataOld.Mdb", _ > "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data > Source=C:\Dump\Data.Mdb" > I have compacted a number of databases with this little programme and > it works fine. The problem is I have one database that it will not > compact and get the error: "You do not have the necessary permissions > to use the '' object. Have your system administrator or the person > who created this object establish the appropriate permissions for > you." > If this database is compacted manually through the > Access-tools-database utilities-compact database it compacts fine > without a problem. If I create another database with some access code > in a module then run a makro when I open this database to compact it, > there is no problem and the database compacts fine. Can the problem be > because of some security issue. Do I need to establish some sort of > connection before doing so? Can anybody shed any light on this matter.
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.