Before using GoldSim's database features you must first identify the databases you need to access using the Windows ODBC Data Sources (32bit) option. This allows you to define a name for each data source, and associate the data source with a specific database file. This article described how to connect to a Microsoft Access database. The ODBC Data Source Administrator Tool accessed from the Control Panel points to the 64-bit versions of system files. Because GoldSim is a 32-bit application on a 64-bit system, the 32-bit version of the ODBC Administrator Tools must be used in order to add database source.
To add a data source to your computer, do the following (the instructions here are for Windows 10; they may differ slightly for other Windows versions):
- Make sure Microsoft Access database engine 2010 is downloaded. There is a 2016 version, but this requires you to install 32-bit Microsoft Office.
- Click Windows button.
- Open the Run app and enter the following executable path- C:\Windows\System32\odbcad32.exe. Click OK.
- You can define your database(s) as either ‘User DSN’ or ‘System DSN’, depending whether you want it to be private or public, respectively. Add a data source by pressing the Add... button.
- Select a driver with the same file extension as your database and press Finish. Note, the selected driver in this example is for Microsoft Access.
- Click Select... within database section and locate your database file.
- Locate and select the specific database file you wish to connect. Click Ok.
- Enter Data Source Name as the same name as your database file. Click Ok.
- Open GoldSim example file: GenericDatabase.gsm.
- Open the Database tab of the data element called Constant_Generic_Scalar.
- Select Database pulldown and select the database file we created called GenericDatabase.
- Click Download Now.
- The Status is now listed as Download succeeded at date and time. And the data is loaded into the element.