Results 1 to 3 of 3

Thread: Access 2.0 Converstion

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 2000
    Posts
    16

    Access 2.0 Conversion

    Does anyone know how to programmatically convert an older Access DB to Access 2000, using VB6.




    [Edited by JR Ewing on 07-28-2000 at 11:27 AM]

  2. #2
    New Member
    Join Date
    Jul 2000
    Location
    Germany
    Posts
    1

    Smile Convertion

    Import the database in Access97.
    Import the Programm in VB60.
    I convertet four project in the same way and I can remember the following problems.
    - The database had a password. (not solved till now)
    - VBX-Controls from MicroHelp.
    If you have a concret problem, mail it to me.
    Wolfgang

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jul 2000
    Posts
    16
    I understand what you're saying, but here's the reason for my question.

    I have people who are using my app with Access 2.0. I don't want to leave it up to them to convert the DB to Access 97 or 2000. I'd like to be able to do it programmatically.

    Here's what I have so far:
    I'm using VB6 with DAO 3.6, because I'm using DAO 3.6 on a Access 2.0 DB I can't perform all the tasks I'd like (i.e. add fields). So I had to change the version type to 3.0 instead of Access 2.0's version of 2.0.

    Function ConvertDB()

    Dim sTempDB As String
    Dim sOldDBVersion As String

    Set db = OpenDatabase(sDB, True)
    sOldDBVersion = db.Version
    db.Close

    If sOldDBVersion < "3.6" Then
    'Get a new name for working DB.
    sTempDB = sDB & "1"

    If FileExists(sTempDB) Then
    Kill sTempDB
    End If

    DBEngine.CompactDatabase sDB, _
    sTempDB, , dbVersion30

    'Delete Old DB and replace with working DB
    Kill sDB
    FileCopy sTempDB, sDB
    Kill sTempDB

    End If

    End Function

    This works fine as far as allowing me to perform the tasks I have, but when I try opening the DB it's still in Access 2.0 and I'd like to be able to convert it to Access 97 or 2000 in my code. I don't know if it can be done, but if you have anymore ideas it'd be appreciated. Thanks again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width