Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Compacting access database vb6 frontend
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.

Report this thread to moderator Post Follow-up to this message
Old Post
lappy
09-30-04 08:55 PM


Re: Compacting access database vb6 frontend
[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.



Report this thread to moderator Post Follow-up to this message
Old Post
Veign
09-30-04 08:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Visual Basic archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:39 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.