Results 1 to 2 of 2
  1. #1
    tym is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Posts
    13

    Angry Can't create 2007 format accdb!

    This is doing my crust in!

    I've found loads of web sites that tell me how to create an accdb file from within VB.Net 2010.
    I've written this function which creates the file and I can open it in Access 2010.

    *HOWEVER*
    When I open it, the first thing Access does is "repair" it, then it opens it as 2002/2003 format!!

    What on earth is going on?



    I have a reference to MS ADO Ext 6.0 for DDL and security...




    Code:
    Imports ADODB
    Imports System.IO
    Imports Microsoft.VisualBasic
    Module modADO
        Public Function CreateDB(ByVal sDBpath As String) As Boolean
            Dim bRET As Boolean = True
            'Add a reference to ADOX (Microsoft ADO Ext. 6.x for DDL and Security)
            Dim ADOXcatalog As New ADOX.Catalog
            Try
                ADOXcatalog.Create("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & sDBpath & "myAccess2007file.accdb;Jet OLEDB:Engine Type=5;")
            Catch ex As Exception
                Debug.Print(ex.ToString)
                bRET = False
            End Try
            ADOXcatalog = Nothing
            Return bRET
        End Function
    End Module
    Last edited by tym; 12-08-2011 at 02:47 AM. Reason: Fixed it!

  2. #2
    tym is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Posts
    13
    Looks like i may have solved it...

    if I take the ";Jet OLEDB:Engine Type=5" off, it seems to work OK.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. converting mdb to accdb format
    By crowegreg in forum Access
    Replies: 1
    Last Post: 05-31-2011, 10:34 AM
  2. Database in unrecognized format - 2010 to 2007
    By ajetrumpet in forum Access
    Replies: 2
    Last Post: 03-16-2011, 01:46 PM
  3. Create Report in a Matrix Format Like Excel
    By ortley77 in forum Reports
    Replies: 1
    Last Post: 08-24-2010, 09:56 AM
  4. Access 2007: Percent Format Issue
    By diane802 in forum Access
    Replies: 6
    Last Post: 12-30-2009, 10:29 AM
  5. Replies: 0
    Last Post: 11-17-2009, 02:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums