Posts

Description:

Error: ‘Access/Excel(DAO) connection is no longer supported…’

Report based on Excel, Access, or a Text file fail to refresh in Crystal Reports.

Could successfully refresh the report in previous version of Crystal Reports.

When refreshing a report connecting to MS Excel, or MS Access, or a Text file in Crystal Reports, it fails with the error:

 

“Failed to load database information.

“Details: Access/Excel(DAO) connection no longer supported,

use another alternative if possible, e.g. ODBC/JDBC.”

 

Followed by:  “Failed to load database information.”

 

 

Steps To Reproduce:

  1. In Crystal Reports 2016 or below, create a new report.
  2. In the Database Expert, under “Create New Connection” double click on “Access/Excel (DAO)”
  3. Select the MS Excel, or MS Access file to report from.
  4. Refresh the report, and it successfully display data.
  5. Save the report.
  6. In Crystal Reports 2020, open the same report, and refresh it.

It generates the error: “Failed to load database information. Details: Access/Excel(DAO) connection no longer supported,…”

 

Cause

  • The report connect to Excel, Access, or a Text file using Microsoft Data Access Objects (DAO), which used Microsoft JET Engine.
  • This 32bit only connectivity technology have been deprecated by Microsoft.
  • Previous versions of Crystal Reports were 32bit applications, and could still use the deprecated Microsoft DAO technology to connect to Excel, Access or a Text file, as a legacy connection type.
  • Crystal Reports 2020 is a 64bit application, and therefore it is no longer possible to connect to Excel, Access, or a Text file using DAO, since there is no 64bit version of this deprecated Microsoft Technology.

 

Resolution:

  • Use an ODBC connection to connect to one of the following data sources in Crystal Reports:
    • MS Excel
    • MS Access
    • Text file
  • For MS Excel, and MS Access, you can also use an OLEDB Connection.

 

To use an ODBC Connection:

  1. Launch the 64bit Microsoft ODBC Data Source Administrator. (C:\Windows\System32\odbcad32.exe)
  2. In the 64bit Microsoft ODBC Data Source Administrator, under the tab “System DSN”, click “Add…”
  3. Select the ODBC Driver corresponding to the type of document you want to report from:

– For MS Excel, select   : Microsoft Excel Driver (*.xls,*.xlsx,*.xlsm,*.xlsb)

– For MS Access, select : Microsoft Access Driver (*.mdb, *.accdb)

– For a Text file, select  : Microsoft Access Text Driver (*.txt, *.csv)

 

Note

If you do not see the ODBC Drivers, then it is either because you have a 32bit version of MS Office installed, or do not have a 64bit MS Office installed. To download and install the 64bit version of the Microsoft Office ODBC drivers, go to the Microsoft website, and search for: “Microsoft Access Database Engine”, then download and install the 64bit Microsoft Access Database Engine.

  1. Then click “Finish”
  2. Add an ODBC DSN Name and select the MS Excel, MS Access, or Text file you want to report from, and click “OK”
  3. In Crystal Reports, open your report based on MS Excel, MS Access or a Text file.
  4. Under the menu “Database”, select “Set Datasource Location”
  5. In the “Replace with” section, expand “Create New Connection”, and double click on “ODBC (RDO)”
  6. Select the ODBC DSN created in the previous steps to report from MS Excel, MS Access, or aText file.

Note: For MS Excel, if the Excel sheets are not visible, then:

  1. Right click on the “Connection”, and in the contextual menu, select “Options”
  2. In the “Options” window, check the option “System Tables”, and click “OK”
  3. Back to the “Database Expert” window, right click on the connection, and select “Refresh”
  4. The MS Excel sheets will now display. Select the desired MS Excel sheet.

 

  1. Once connected, in the section “Replace with”, select the new ODBC connection, and in the section “Current Data Source”, select the current connection, and click the button “Update”
  2. Once the connection is updated, click “Close”
  3. Back to the report, save the report.

 

To use an OLEDB connection

  1. In Crystal Reports, open your report based on MS Excel or MS Access.
  2. Under the menu “Database”, select “Set Datasource Location”
  3. In the “Replace with” section, expand “Create New Connection”, and double click on “OLE DB (ADO)”
  4. Select the Microsoft Office Access Database Engine Provider.

 

Note

If you do not see the OLEDB Provider, then it is either because you have a 32bit version of MS Office installed, or do not have MS Office installed. To download and install the 64bit version of the Microsoft Office ODBC driver and OLEDB Provider, go to the Microsoft website, and search for: “Microsoft Access Database Engine”

  1. Change the Office Database type to: Excel, or Access
  2. Select the MS Excel, or MS Access file.
  3. Leave the User ID and Password blank.
  4. Once connected, in the section “Replace with”, select the new OLEDB connection, and in the section “Current Data Source”, select the current connection, and click the button “Update”
  5. Once the connection is updated, click “Close”
  6. Back to the report, save the report.

If you are creating a web app that uses lambda and a mysql database, there will be many times where you need to have sql information passing to and from lambda functions. A way to connect a lambda functions to a mysql database is using npm mysql. To set up the connection, there must be a connection variable defined. This variable must contain the mysql host name, user, password, and database. Once these are defined, the lambda function can connect to the mysql database with the code “connection.connect()”. Once this is ran, your lambda function can now run queries. These queries are written just like a regular sql query. Once you are done running your query make sure to declare your connection closed by stating “connection.end()”.

The process.env variables would be were you put your sql information.

 

**Note: You might need to configure your lambda function to be set up on the mysql database’s VPC.

Most of customers have by now switched over to a Windows / SQL server environment, but we still have several customers who have stayed on Oracle for their Database needs. This mostly stems from having the Oracle skill set in-house as there is really no other advantage to staying on Oracle once you have moved over to Windows.

Often when there are troubles with connecting to the application, it is relevant to test the connection the database from the server itself. Of course there are several ways to do this, but test fastest way is to do so directly from the command prompt in LID as it doesn’t require any additional setup or software. But it is easy to forget how this is done so we decided to write this quick article to document this very simple syntax.
The utility we’re going to use is called sqlplus and it should already installed on your LSF application server. Simply login to the server using LID and on the command prompt type in the following command:
sqlplus <username>/<password>@dbserverName
If you have the correct username and password, and the server is responding, you will get a SQL> prompt on which you can run any query you want. Here’s an example:
However if you type in the incorrect username:
And finally, if you have the incorrect server name or the server is not responding, the prompt will be suspended for several seconds and you will see the following message:
A few small notes about using sqlplus:
  • Be sure to use a semicolon to end your statements. Otherwise the application doesn’t know when to run your query.
  • Make sure the environment variable %ORACLE_HOME% is set correctly. ($ORACLE_HOME on Unix):
  • To exit sqlplus user the “quit” command
  • The SQL buffer contains the last statement you ran, and you can run the previous query again by simply typing “RUN”  and hitting enter.
  • User the LIST command to see a list of your most recently executed SQL commands.
  • “HELP INDEX” shows a list of possible commands
  • To launch a sql script simply put the “@” symbol in front of the file name and execute it. like: @script.sql or even @/path/to/script.sql
  • You can have a multi-line sql statement.
  • The “SHOW USER” command prints the name of the Oracle user you’re logged in as
  • The “SHOW ALL” command prints all the current settings to the screen.