Home > Archive > Visual Basic > September 2004 > Compacting access database vb6 frontend
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| 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.
| |
|
| [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.
|
|
|
|
|