dcsimg


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Compacting an Access 2000 Database?

  1. #1
    Guest

    Compacting an Access 2000 Database?

    Hello,


    I am having trouble getting my database to compact with the following code

    Dim X As JRO.JetEngine
    Set X = New JetEngine
    X.CompactDatabase "Provider=Microsoft.Jet.OLEDB.4.0;Data
    Source=c:\\test2k.mdb", _
    "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\testOut.mdb;Jet
    OLEDB:Engine Type=4"

    This fails with:
    Cannot perform this operation; features in this version are not
    available in databases with older formats.

    I am using an Access2k database. . interestingly if I convert the database
    back to an older version. It works. The only information I could find in
    the KB (Q238401) suggested I use the 4.0 provider which of course I am.


    Has anyone else had this problem?

    Greg





  2. #2
    Pat Cantey III Guest

    Re: Compacting an Access 2000 Database?

    Greg,

    I believe you need to use "Jet OLEDB:Engine Type=5" to indicate an Access2k
    dB.

    Pat


    <gdavis@citynetworks.com> wrote in message news:3925c56e$1@news.devx.com...
    > Hello,
    >
    >
    > I am having trouble getting my database to compact with the following code
    >
    > Dim X As JRO.JetEngine
    > Set X = New JetEngine
    > X.CompactDatabase "Provider=Microsoft.Jet.OLEDB.4.0;Data
    > Source=c:\\test2k.mdb", _
    > "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\testOut.mdb;Jet
    > OLEDB:Engine Type=4"
    >
    > This fails with:
    > Cannot perform this operation; features in this version are not
    > available in databases with older formats.
    >
    > I am using an Access2k database. . interestingly if I convert the

    database
    > back to an older version. It works. The only information I could find in
    > the KB (Q238401) suggested I use the 4.0 provider which of course I am.
    >
    >
    > Has anyone else had this problem?
    >
    > Greg
    >
    >
    >
    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center