Creating a Data Link to an ODBC Source
NoteThe instruction below describes the process of creating a link to a data source from a Microsoft Excel file. In the same way, can create data links to Microsoft Access databases, plain ASCII text files, and comma-separated files.
- Open the Field dialog box from one of
the following components:
If you want to… Then… insert a database field into a text element see . insert a database field into an multiline text (mtext) element see . insert a database field into an AutoCAD table cell see . insert a database field into an attribute definition see . insert a database field into a property set definition see . insert a database field into an object property see . insert a database field into an object style see .
- Under Field Category, select AEC Database.
- Under Field Names, select DatabaseField.
one of the following buttons:
Button Description Use this button if you want to create a new UDL link on a 32-bit computer. Use this button if you are working on a 64-bit computer, but want to create a link to a 32-bit data source. Use this button if you are working on a 64-bit computer, and want to create a link to a 64-bit data source.
- Click the Provider tab.
- Select Microsoft OLE DB Provider for ODBC Drivers, and click Next.
- In the Connection tab, click Use connection
- Click Build.
- Click New to build to a new DSN file.
- In the Create New Data Source dialog box, select the Microsoft Excel Driver (*.xls).
- Click Next.
- Enter a name for the new DSN file, and click Next.
- Confirm that your data source settings
are correct, and click Finish.
- In the ODBC Microsoft Excel Setup dialog box, select the version of Microsoft Excel that the DSN file should support.
- Click Select Workbook.
- Select an XLS file that should be used
as your data source, and click OK three times until you are back
in the Connection tab of the Data Link Properties dialog box.
- To verify that the connection to the data source is working correctly, click Test Connection.
- Enter a user name and optionally a password for the database connection.
- Under Enter the initial catalog to use, select the Excel file from the drop-down list.
- Optionally, you can click the Advanced tab to define network and permission settings.
- If you have selected a data source on a network server, you can define the network settings.
- Define the access permissions for the data source.
- Optionally, you can click the All tab to view and edit the OLE DB initialization properties available for the selected OLE DB provider.
- Click OK.
- In the Field dialog box, the selected Excel file is displayed as the data source.