Demandbase Product Ideas

Demandbase is dedicated to building a platform for you and we want your input! The Demandbase Product Team reviews ideas submitted Demandbase on a regular basis and use these ideas as we develop new features, so don't be shy!

How To Connect Sage To A Database? [Detailed Steps]

There are numerous specific mathematical databases either included in Sage or available as optional packages. Also, Sage includes two powerful general database packages. Sage includes the ZOPE object oriented database ZODB, which “is a Python object persistence system. It provides transparent object-oriented persistence.” Sage also includes the powerful relational database SQLite, along with a Python interface to SQLite. SQlite is a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine. There are further other databases that you can connect with Sage.


Methods To Help You Connect Sage To Connect Database?

Certain programs, such as Microsoft Excel or Access, allow you to connect to your Sage 50 company data using ODBC by implementing which would be able to fix sage 50 error connecting to database. This allows you to create reports using your company data directly from these programs. To do so, follow these steps:


Method 1: Allow Data Access from your Sage 50 Company

  • Open Sage 50 and your company.

  • Select Maintain, Users, Set up security.

  • Select the Crystal Reports/Data Access tab on the User Security window.

  • Under Access from Outside Sage 50, select With the following login information, and then press Change.

  • Enter a password and confirm it. Note: The password must be exactly 7 characters in length and contain at least one letter and one number.

  • Click Close to close the window, and you will be ready to use an ODBC or OLE DB connection for read-only access to your company data.


Method 2: ODBC Connections

Before you can connect to the Sage 50 database via ODBC to fix sage 50 error connecting to database, it is necessary to add the Pervasive database engine as an ODBC data source using these steps:

  • Select Start, Run.

  • In the Open field, type odbcad32 and click OK.

Note: For 64-bit versions of Microsoft Windows, users must type the following instead: “%systemdrive%\Windows\SysWow64\odbcad32.exe” and click OK.

  • The ODBC Data Source Administrator window appears.

  • Select the User DSN tab

  • Click the Add button on the right; then follow the appropriate steps below.


Single user/Single computer environments:

  • In the Create New Data Source window, select Pervasive ODBC Engine Interface and click Finish.

  • The Pervasive ODBC Engine DSN Setup window appears. Enter a Data Source Name and select the Database Name from the drop-down list. The Database Name will appear as the company name in Sage 50. Click OK.

  • The Data Source Name should now appear in the User Data Sources list. Select OK.

Network/Multi-user environments:

  • In the Create New Data Source window, select Pervasive ODBC Client Interface and click Finish.

  • The Pervasive ODBC Client DSN Setup window appears. Enter a Data Source Name and an Address. The Address will be the IP Address or the computer name to the server where the Sage 50 data is located. Click Create.

  • Browse and select your individual company folder for the Dictionary Location; click OK, enter something unique in the Database Name box and then click OK on all screens.

  • The Data Source Name should now appear in the User Data Sources list. Select OK.

  • You will now be able to use the new ODBC connection in a 3rd party application of your choice that supports ODBC.


Using the ODBC Connection to Sage 50:

  • Any application that supports ODBC connections can use the ODBC Data Source you created above. In this example, we will use Microsoft Access to retrieve data from Sage 50 via the ODBC connection you created above.

  • Open Microsoft Access and select File, Open.

  • On the Open window, choose ODBC Databases() from the Files of type drop-down menu. (In Access 2016 click Browse and choose ODBC Databases() from the Files of type drop-down menu. Then skip to step 5.)

  • Select the External Data tab, and then select ODBC Database.

  • Select OK.

  • On the Select Data Source window, click the Machine Data Source tab.

  • Choose the ODBC data source that was created in the steps above and select OK.

  • Enter the Username and Password on the login window.

  • Select one or more tables from the list (hold down the control key to select more than one table) and click OK.

  • You will now see the selected tables listed in the database window.

Method 3: OLEDB Connections

Using the OLE DB connector, an application can connect directly to a database. We will use Microsoft Excel for this example:

  • In a new Excel spreadsheet select Data, From Other Sources, From Data Connection Wizard, ODBC DSN, and click Next.

  • Select the Data Source Name created in Section II.

  • Enter the Username and Password to access data from Outside of Sage 50 created in Section I.

  • Select a table from the list, click Next, and then click Finish.

  • Click OK on the Import Data screen.

  • Enter the Username and Password to access data from Outside of Sage 50 and click OK.

  • Confirm that the data populates in the worksheet.

Method 4: Connect to CrystalReports.udl file to create a custom report

  • Reports & Forms, Crystal Report Designer, and click OK on any messages.

  • Select Blank Report, click the + sign next to Create New Connection, and then click the + sign next to OLE DB (ADO).

  • Select the Use Data Link File check box.

  • In the Microsoft Data Link File box browse to your individual company folder, select the CrystalReports.udl file and then click Next.

  • Enter the Username and Password to access data from Outside of Sage 50, click Next, and then click Finish.


Summing It Up!

We hope the above-listed methods would have helped you connect Sage to its database, that further would have helped you resolve sage 50 error connecting to database issue as well. However, if you’re still stuck and need further assistance, we would suggest you reach out to our experts.

  • Lily Evans
  • Sep 13 2021
  • New idea
  • Attach files