Skip to Content
0
Former Member
Feb 10, 2016 at 02:31 PM

Crystal reports - Microsoft Access - 64bit OS

610 Views

Hi,

I have a .NET 1.0/VS 2003 application with Crystal reports that uses a MS Access DB. I'm migrating it to .NET 4.0/VS2010. The 32-bit application works fine, but the 64-bit doesn't. To begin with, I found out that the OLE DB driver that I used doesn't (and wont) exist in 64-bit version, so I installed the recommended "Microsoft Access Database Engine 2010 Redistributable". Windows forms application succesfully connects to DB, but Crystal Reports doesn't - any attempt to display a report in the report viewer component fails with the message "Failed to load database information...". I attached the screenshot, along with CR debugging files.

Here is the code I use to connect Windows forms to the database (the old connection is commented out):

ConnectionString =
    @"Provider=Microsoft.ACE.OLEDB.12.0;Password="""";" +
    //@"Provider=Microsoft.Jet.OLEDB.4.0;Password="""";" +
    @"User ID=Admin;Data Source=" +
    DatabasePath + ";Mode=Share Deny None;" +
    @"Jet OLEDB:Database Password=""my_password""";



This is the code I use to connect CR to the database:

foreach (Table t in rpt.Database.Tables)
{
    TableLogOnInfo logOnInfo = new TableLogOnInfo();
    logOnInfo = t.LogOnInfo;
    ConnectionInfo connectionInfo = new ConnectionInfo();
    connectionInfo = logOnInfo.ConnectionInfo;
    connectionInfo.DatabaseName = DatabasePath ;
    connectionInfo.ServerName = DatabasePath ;
    connectionInfo.Password = "my_password";
    t.ApplyLogOnInfo(logOnInfo);
}

  .lyLogOnInfo(logOnInfo);



I must say that due to the lack of documentation I'm not sure if the second piece of code is correct (beyond that it works fine on 32-bit OS) and which DB driver it uses.

I'd appreciate any help (other than to change the DB, which is not possible at the moment).