[BCB:5:Third-party support:ECB] NOTE: ODBC connections won’t work with 64-bit database programs or 64-bit versions of Microsoft Excel. You’ll need to use the 32-bit version. 1. Allow data access from your Sage 50 company -
Open Sage 50 and your company. -
Select Maintain, Users, Set Up User 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. -
Click Close to close the window. You're ready to use an ODBC or OLE DB connection for read-only access to your company data. 2. Set up a data source ODBC data source Before you can connect to the Sage 50 database via ODBC, add the Pervasive database engine as an ODBC data source: - 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 will 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.
- Enter a Data Source Name and an Address.
- The Address is the IP Address or the name of the computer with your Sage 50 company data
- 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 will now appear in the User Data Sources list. Select OK.
- You’ll now be able to use the new ODBC connection in a third-party application.
-
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’ll use Microsoft Access. - Open Microsoft Access, and select File, Open.
-
On the Open window, choose ODBC Databases() from the Files of type drop-down menu. -
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 you created in the steps above and select OK. -
Enter the User Name and Password on the login window. - Select one or more tables from the list and click OK.
- Hold down the control key to select more than one table
-
You’ll now see the selected tables listed in the database window. OLEDB connection -
Connecting to Sage 50 using OLEDB Using the OLEDB connector, an application can connect directly to a database. We’ll use Microsoft Excel for this example: - In a new Excel spreadsheet select Data, From Other Sources, From Data Connection Wizard, ODBC DSN.
- Click Next.
- Select the Data Source Name you created.
- Enter the User name and Password to access data from Outside of Sage 50 created in Section 1.
- Select a table from the list, click Next, and then click Finish.
- Click OK on the Import Data screen.
- Enter the User name and Password to access data from Outside of Sage 50 and click OK.
- Confirm that the data populates in the worksheet.
[BCB:161:Chat 50 US:ECB]
|