Skip to content

Database Connection Palette

(Available in Platinum)

Default UI Menu: Tools/Palette/Database Connect

Ribbon UI Menu:

img

TurboCAD has the ability to connect to a database and associate the data with objects. Database connectivity and management is handled through the Database Connection Palette.

img

To Create a Database Connection:

  1. Open the Database Connection Palette.
  2. Right click on the DataSources icon and click Add DataSource.

img

  1. In the Add Datasource dialog type in the name of the new datasource and click OK.

img

  1. The Data Link Properties dialog will open.

  2. On the Provider page select the appropriate OLE DB Provider type for the datasource to which you wish to connect. Then click Next.

img

  1. The Connection page will appear.

img

  1. Specify the database source. or

  2. Use connection String

  3. Click Build

img

  1. Select a File Data Source or Machine Data Source

img

img

  1. Set login info if needed, then press OK.

img

  1. Select the Database.

img

  1. Setup the Server login information.

  2. Click the Test Connection button. If the connection is valid the Test Connection Succeeded message will appear.

img

  1. At this point you can move on to the Advanced and All pages, or click OK.

  2. The features and functions of the Advanced and All pages are network and database specific, and are dependent upon your network and OBDC/OLE DB protocols. Only a person and experienced with your network and database protocols should alter these settings.

img

img

  1. After these operations you will see a new datasource object in DataSources tree.

img

  1. The datasource is not yet connected. Right-click on the datasource and select Connect.

img

  1. Your database is now connected to TurboCAD as a datasource.

  2. When connected a datasource shows all available tables and views in database.

To Disconnect a Datasource:

  1. Select a connected datasource in the DataSources tree.
  2. Right-click on the datasource and select Disconnect.

img

To Re-configure a Datasource:

  1. Select a datasource in the DataSources tree.
  2. Right-click on the datasource and select Configure. This will open the Data Link Properties dialog.

img

  1. Make the required changes and click OK.

To Remove a Datasource:

  1. Select a datasource in the DataSources tree.
  2. Right-click on the datasource and select Remove DataSource.

img

  1. You will be prompted with a warning dialog.

  2. If you are clear to proceed click Yes.

img

To Export a Datasource:

  1. Select a datasource in the DataSources tree.
  2. Right-click on the datasource and select Export DataSource.

img

  1. This will open Save As dialog.

img

  1. Select a location and name for the datasource, and then click Save.

To Import a Datasource:

  1. Right click on the DataSources icon and click Import DataSource.

img

  1. This will start the Open dialog.

img

Note: Connect is only available when a datasource is disconnected. Disconnect is only available when a datasource is connected.

In order to connect data from tables to graphic objects it is necessary to create Link Templates. Link templates set a pattern that defines which the data elements will be linked from the table and associated with designated graphic objects. To Create a New Link Template:

  1. Select a table in the DataSources tree.

img

  1. Right-click and select New Link Template, or click the . The New Link Template dialog will appear.

img

  1. Type in a name for the link template, and then click OK.

img

  1. The Link Template Edit dialog will appear.

  2. Select the Key Columns. These are used to define link information data for linked graphics.

  3. Select the Value Columns. These values will be set as custom properties of the object.

  4. The created link template will be attached to current active drawing.

img

To Edit a Link Template:

  1. Select the template in the DataSources tree.

img

  1. Right-click and select Edit. The Link Template Edit dialog will appear.

img

  1. Make the required changes, and then click OK.

To Remove a Link Template:

  1. Select the template in the DataSources tree.
  2. Right-click and select Delete.

Warning: The link template will be immediately deleted. Removing a link template leads to removing all graphic links bound to it.

img

  1. You will be prompted to confirm the deletion.

Linking Data to Graphics

Data is linked to graphics by connecting a table to specific graphics via link templates. To Connect Data to Graphics:

  1. In a drawing, select one or more graphics.

img

  1. In the DataSources tree, double click on the desired table to select it for linking. This will also open the view of the table in the lower frame of the palette.

img

  1. In the table view, in the lower frame of the palette, click on the record you wish link.

img

  1. Use the Link Template drop-down box located on the palette toolbar to select the desired link template.

img

  1. Click the Create Link button on palette toolbar.

img

  1. The link between the selected graphics and the table record is created.

  2. Go to the Custom Properties of the object to verify the link.

img

Synchronizing Data and Graphics

To get data into linked graphics it is necessary to synchronize the data. The synchronizing process copies data from the datasource into all linked graphics and places it in the custom properties of linked graphics. To Synchronize Data:

  1. Click the Synchronize Data button on toolbar to run synchronizing process.

img

  1. Verify that the data has been synchronized by opening the properties of a graphic that is linked and going to the Custom page.

img

To Remove Links from Selected Graphics:

  1. Select the graphic/s you wish to de-link.
  2. In the DataSources tree select the link template you wish to de-link from the graphic/s.

img

  1. Right-click and select Delete Links(Sel).

img

  1. Synchronize the data.

  2. The links and data have been removed.

To Remove All Links to a Link Template:

  1. In the DataSources tree select the link template you wish to de-link.

img

  1. Right-click and select Delete All Links.

img

  1. Synchronize the data.

  2. The links and data have been removed.

To Find Graphics Linked to the Data source:

  1. Select the data source.
  2. Click the View linked objects in drawing button on palette's toolbar.
  3. Right-click and select Find Graphics.

img

To Find Table Record Linked to a Selected Graphics:

  1. Select a graphic.
  2. Click the View linked records in data view button on palette's toolbar.

img

  1. All records which are linked to the selected object will be highlighted in the table view.

img

Viewing and Editing Data in Tables

When connected a datasource shows all available tables and views in database. Available tables and views appear as child nodes of the datasource.

img

To Show a Table's Content:

  1. Select the table in the DataSources tree.
  2. Right-click and select View Table, the table will be opened in the lower frame of the Data base Connection palette in Read-Only mode.

img

To Edit a Table's Content:

  1. Select the table in the DataSources tree.
  2. Right-click and select Edit Table, the table will be opened in the lower frame of the Data Base Connection palette in Edit mode.

img