none
ADODB with Office 2013 RRS feed

  • Question

  • I have an application written in VB.Net 2010 that has been in use by my client for about a year now. The program stores its data in an Access 2010 database. Recently, at some of their locations, they have tried using the program on computers that have Office 2013 installed and my program does not work. I suspect that the problem may be due all or in part to incompatibilities between the version of ADODB and/or ADOx that my program references and that which is installed with Office 2013.

    My program references Microsoft ActiveX Data Objects 6.0 Library (interop.adodb.dll) version 6.0.0 and Microsoft ADO Ext. 6.0 for DDL and Security (interop.adox.dll) version 6.0.0.0.

    The code where the program fails is this:

            Dim intDatabaseVersion As Integer = 0
            Dim intCurrentDatabaseVersion As Integer = 3
    
            Const VersionTable As String = "Version"
            Dim cnn As New ADODB.Connection
            Dim cat As New ADOX.Catalog
            Dim tbl As ADOX.Table
            Dim idx As ADOX.Index
    
            Dim rst As ADODB.Recordset
    
            Try
                rst = New ADODB.Recordset
    
                cnn.Open(My.Settings.rubsConnectionString)
                cat.ActiveConnection = cnn
    
                tbl = cat.Tables(0)
    
                For x As Integer = 0 To cat.Tables.Count - 1
                    tbl = cat.Tables(x)
                    If tbl.Name = VersionTable Then Exit For
                Next
            Catch ex As Exception
                Throw New Exception("CheckVersion Initialization Error", ex)
            End Try
    

    I have the target CPU set to x86.

    So, given that I need to support computers running Office 2010 and 2013, what version of ADODB and ADOX should I reference? Also, will it matter if they are running the 64 bit or 32 bit version of Office?

    One thing I don't understand is that my contact at my client says the program stopped working on her computer too. I assume that her computer was not upgraded to Office 2013, so I'm not sure why that would be the case.

    Further, she sent me a database file from a property that had this problem even though they were able to run my program last month. Only two tables contained any data. They each contained one record. In use, those two tables are supposed to contain only one record, but there should have been data in the other tables as well. So I don't know why that data is gone now. The file she sent me is 16MB in size. A file they sent me a month ago is only 6MB. I don't think that in a month the file should grow that much, especially since there was almost no data in the file. So, it appears the file must have become corrupted some how. Would an ADODB version incompatibility cause that? If not, does anyone have any idea why that might have happened?

    Thank you in advance for any help.

    Friday, August 23, 2013 6:09 PM

Answers

  • Hello Spencersoft,

    Welcome to MSDN Forums.

    >I suspect that the problem may be due all or in part to incompatibilities between the version of ADODB and/or ADOx that my program references and that which is installed with Office 2013. So, given that I need to support computers running Office 2010 and 2013, what version of ADODB and ADOX should I reference? Also, will it matter if they are running the 64 bit or 32 bit version of Office?

    ADO is a part of the Windows Data Access Component included in Windows Operation. ADO 6.0 is functionally equivalent to ADO 2.8. ADO 2.8 was included in Windows XP and Windows Server 2003. So I think this issue should be version- independent.

    > One thing I don't understand is that my contact at my client says the program stopped working on her computer too. I assume that her computer was not upgraded to Office 2013, so I'm not sure why that would be the case.

    What we could do next is find out specific error details information. For guidance on how to deal with ADO errors, check out this documentation: http://msdn.microsoft.com/en-us/library/hh230677.aspx

    >I don't think that in a month the file should grow that much, especially since there was almost no data in the file. So, it appears the file must have become corrupted somehow. Would an ADODB version incompatibility cause that? If not, does anyone have any idea why that might have happened?

    You can try the Compact & Repair Database (Tools-->Database utilities-->Compact and Repair Database). This should reduce the DB Size. If you want to do the same using code, here is the way. http://vbadud.blogspot.in/2007/09/reducing-size-of-microsoft-access.html

    I hope this will help resolve your problem. If anything is unclear, please free feel to let us know.

    Best Regards,


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, August 26, 2013 2:12 AM
    Moderator

All replies

  • Hello Spencersoft,

    Welcome to MSDN Forums.

    >I suspect that the problem may be due all or in part to incompatibilities between the version of ADODB and/or ADOx that my program references and that which is installed with Office 2013. So, given that I need to support computers running Office 2010 and 2013, what version of ADODB and ADOX should I reference? Also, will it matter if they are running the 64 bit or 32 bit version of Office?

    ADO is a part of the Windows Data Access Component included in Windows Operation. ADO 6.0 is functionally equivalent to ADO 2.8. ADO 2.8 was included in Windows XP and Windows Server 2003. So I think this issue should be version- independent.

    > One thing I don't understand is that my contact at my client says the program stopped working on her computer too. I assume that her computer was not upgraded to Office 2013, so I'm not sure why that would be the case.

    What we could do next is find out specific error details information. For guidance on how to deal with ADO errors, check out this documentation: http://msdn.microsoft.com/en-us/library/hh230677.aspx

    >I don't think that in a month the file should grow that much, especially since there was almost no data in the file. So, it appears the file must have become corrupted somehow. Would an ADODB version incompatibility cause that? If not, does anyone have any idea why that might have happened?

    You can try the Compact & Repair Database (Tools-->Database utilities-->Compact and Repair Database). This should reduce the DB Size. If you want to do the same using code, here is the way. http://vbadud.blogspot.in/2007/09/reducing-size-of-microsoft-access.html

    I hope this will help resolve your problem. If anything is unclear, please free feel to let us know.

    Best Regards,


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, August 26, 2013 2:12 AM
    Moderator
  • Could you post the exception (error) that is occurring? I don't think it's an issue with the version of ADO you are using, but with Office 2013 installed it is very likely that a newer version of the ACE OLEDB Provider is installed. In addition, if your app is compiled to run 32-bit and 64-bit Office is installed, it would render your app inoperable if the 32-bit drivers have been removed.

    Paul ~~~~ Microsoft MVP (Visual Basic)

    Monday, August 26, 2013 12:32 PM