![background image](http://html1.mh-extra.com/html/omron/cx-supervisor/cx-supervisor_user-manual_744211187.webp)
Configuring a Connection
SECTION 12 Databases
186
12-2-6 Creating a Read/Write connection to an Excel file
Connections to Excel files may result in the error "Operation must use an
updateable query". This is because the Provider installed with ADO version
2.0 is read only by default hence Records can not be added or amended. To
override this function you must manually change the Read Only property in the
Connection String. On the "Modify Connection" dialog box click "Advanced…"
and set the connection property as shown in the last line below:
Driver={Microsoft Excel Driver (*.xls)};
DBQ=C:\WorkBook.xls;
ReadOnly=False;
Excel files can also be updated by accessing the file via the ODBC DSN driver.
This is achieved by carrying out the following steps:
•
Create a File DSN for the required Excel file with the following options (see
Chapter 12, Creating a Data Source Name file)
•
Select the Microsoft Excel Driver (*.xls). If this option does not exist, you
will need to install the Microsoft ODBC driver for Excel from the Excel
setup.
•
Ensure that the "Read Only" check box is clear.
•
Load the Excel spreadsheet and create a table to access the data by
creating a Named Range as follows:
•
Highlight the row(s) and column(s) area where your data resides
(including the header row).
•
On the 'Insert' menu, point to 'Name', click 'Define' and enter a name for
your range.
•
Create a connection in the CX-Supervisor Workspace specifying the File
DSN as its source.
•
Add a Recordset to the connection and select the Named Range (which
will appear in the list of available tables, if the connection is live) as the
Table name. Records in this table can now be added or modified as with
any other database table (Note: If records are added to this type of table
the Named Range will increase in size accordingly automatically).
The example below demonstrates a valid range selection named:
"CustomerInvoice" (note the name displayed just above column A):
Note:
The first row of the range is assumed to contain the Column Headings.
Содержание CX-Supervisor
Страница 1: ...CX Supervisor Software Cat No W10E EN 01 User Manual Software Release 3 1...
Страница 3: ...Copyright Notice 2...
Страница 16: ...15...
Страница 17: ...16...
Страница 27: ...Tip of the Day SECTION 1 Graphics Editor 26...
Страница 35: ...CX Supervisor Preferences SECTION 2 Pages 34...
Страница 79: ...Responding to Events SECTION 5 ActiveX Objects 78...
Страница 115: ...Printing the Graphics Library SECTION 7 Graphics Library 114...
Страница 181: ...Data Logging SECTION 11 Data Logging 180...
Страница 201: ...Examples SECTION 12 Databases 200...
Страница 243: ...Performance Monitor SECTION 16 Application Analysis Performance Monitor 242...
Страница 253: ...Using with Omron s CX Server OPC SECTION 17 Using CX Supervisor as an OPC Cli 252...
Страница 259: ...Creating a CX Supervisor Client application SECTION 18 Connecting to a remote CX 258...
Страница 263: ...Adding a Point Linked to a Parameter SECTION 19 Connecting to Omron Industrial 262...
Страница 271: ...Data Logging SECTION 20 Best Practices 270...
Страница 275: ...Configuring a Server PC running Windows NT or 2000 Appendix A Configuring a PC 274...
Страница 277: ...Appendix B Frequently Asked Questions 276...
Страница 296: ...Appendix B Frequently Asked Questions 295...
Страница 297: ...Appendix B Frequently Asked Questions 296...
Страница 298: ...Appendix B Frequently Asked Questions 297...
Страница 299: ...Appendix B Frequently Asked Questions 298...
Страница 333: ...Revision history 332...