はじめに
Note: This is third post in a series entitled “Database Connectivity Basics”.
This installment in the Database Connectivity Basics series consists simply consists of information you should know about Origin database connectivity.
It is assumed you have read trough the previous two posts: The SQL Editor Dialog 、 Connecting to a Database and Importing Data.
The Things to Know
- Imported data is read only- it is locked to prevent modification.
- Column Label Rows are editable to facilitate better graph labeling.
- Individual columns cannot be sorted but the worksheet as a whole can be sorted based on one or more columns. Note: worksheet sorting is not preserved when data is re-imported.
- Filters may be applied to the worksheet. Unlike sorting, Filters will preserve their status.
- Columns may not be moved but additional columns may be added to the end of the sheet. These columns will be preserved when re-importing.
- By default, imported data is not kept in the worksheet when the project is saved and closed. This can be overridden by clicking on the database icon in the upper left of the worksheet ( see image to the right) and clearing the check mark beside Exclude Imported When Saving.
- Data can be re-imported at any time via the database icon ( see image to the right).
- The SQL Editor can be re-opened at any time via the database icon ( see image to the right).
- You can get a Connection String for a particular database connection from the SQL Editor File: Edit Connection String… menu item.
- Connection Strings are a useful method for quickly establishing a new connection from an existing connection. If the authentication/login info in a Connection String is encrypted, the authentication settings will be ignored and you will be prompted for them again.
- If your connection is unencrypted, you can encrypt it later via the SQL Editor Setting: Encrypt Login Info menu item.
- You can use LabTalk substitution (variables) in your SQL Statement to make it dynamic.
- If importing data seems slow for ODBC connections, you can try switching between Setting: Import Data by OLE DB 、 Setting: Import Data by ODBC to see which has better performance.
- Support for importing images from a database into cells in a worksheet has been tested with SQL Server and MySQL. In the future, more database systems may be tested. If ODBC is being used for image import, it may be necessary to specify Import Using OLE DB in the SQL Editor dialog.
In the next post in the series, I will Illustrate how to use Lab Talk substitution in an SQL statement to make it dynamic by pulling only data that meets LabTalk-based criteria.