SQL Data Grid Users Guide
SQL Data Grid Users Guide
Users Guide
Revision A
Last Revision: 3/18/08
Copyright
2008 Invensys Systems, Inc. All Rights Reserved.
All rights reserved. No part of this documentation shall be reproduced, stored in a
retrieval system, or transmitted by any means, electronic, mechanical,
photocopying, recording, or otherwise, without the prior written permission of
Invensys Systems, Inc. No copyright or patent liability is assumed with respect to
the use of the information contained herein. Although every precaution has been
taken in the preparation of this documentation, the publisher and the author
assume no responsibility for errors or omissions. Neither is any liability assumed
for damages resulting from the use of the information contained herein.
The information in this documentation is subject to change without notice and does
not represent a commitment on the part of Invensys Systems, Inc. The software
described in this documentation is furnished under a license or nondisclosure
agreement. This software may be used or copied only in accordance with the terms
of these agreements.
Invensys Systems, Inc.
26561 Rancho Parkway South
Lake Forest, CA 92630 U.S.A.
(949) 727-3200
http://www.wonderware.com
For comments or suggestions about the product documentation, send an e-mail
message to productdocs@wonderware.com.
Trademarks
All terms mentioned in this documentation that are known to be trademarks or
service marks have been appropriately capitalized. Invensys Systems, Inc. cannot
attest to the accuracy of this information. Use of a term in this documentation
should not be regarded as affecting the validity of any trademark or service mark.
Alarm Logger, ActiveFactory, ArchestrA, Avantis, DBDump, DBLoad, DT Analyst,
Factelligence, FactoryFocus, FactoryOffice, FactorySuite, FactorySuite A2, InBatch,
InControl, IndustrialRAD, IndustrialSQL Server, InTouch, MaintenanceSuite,
MuniSuite, QI Analyst, SCADAlarm, SCADASuite, SuiteLink, SuiteVoyager,
WindowMaker, WindowViewer, Wonderware, Wonderware Factelligence, and
Wonderware Logger are trademarks of Invensys plc, its subsidiaries and affiliates.
All other brands may be trademarks of their respective owners.
Contents
Welcome............................................ 5
Documentation Conventions ..............................................5
Technical Support ...............................................................6
Contents
Welcome
Documentation Conventions
This documentation uses the following conventions:
Convention
Used for
Initial Capitals
Bold
Monospace
Technical Support
Wonderware Technical Support offers a variety of support
options to answer any questions on Wonderware products
and their implementation.
Before you contact Technical Support, refer to the relevant
section(s) in this documentation for a possible solution to the
problem. If you need to contact technical support for help,
have the following information ready:
Chapter 1
Configuring the SQLDataGrid
Symbol
SQL Server
Windows Authentication
If you use Windows as a value for the Authentication_dg
custom property and do not designate custom properties for a
domain, user, or password, the SQLDataGrid symbol uses
the credentials of the user who is currently logged on to the
node running InTouch.
If you select Windows as a value for the Authentication_dg
custom property and designate custom properties for a
domain, user, and password, the SQLDataGrid symbol uses
the specified Windows domain name, user name, and
password to connect to the SQL Server database.
SQL Server
This authentication mode uses the specified SQL Server user
name and password to connect to the SQL Server database.
10
11
Database Connectivity
Diagnostic
Appearance
12
CmdPagePrev_dg
ColumnAggregateEnable_dg
ColumnFiltering_dg
ColumnGroupingEnable_dg
ComboBoxPanelHide_dg
FontBold_dg
FontName_dg
FontSize_dg
SupportThemes_dg
WriteButtonHide_dg
Type a tag name. If the tag does not exist, you are
prompted to define a new tag.
13
14
15
Chapter 2
Working with the SQLDataGrid in
Run Time
During run time, you can select the database table, view, or
query that will populate the SQLDataGrid symbol and
change the appearance of the data.
You can use the run-time application to perform the
following tasks:
Move columns
Group columns
Filter columns
Sort columns
16
Viewing Data
You can use the run-time version of the SQLDataGrid
symbol to view data in the following formats:
You can resize the column width of any table, view, or query
result.
To view specific data from a SQL query
1
Click OK.
Viewing Data
17
Moving Columns
You can rearrange the order of the columns to meet your
viewing needs.
To move columns
1
Grouping Columns
The group-by function lets you sort data at more specific
levels. This example shows a view that groups customer
names and their business addresses.
Note The ColumnGroupingEnable_dg custom property must be
True before you can use this function.
To use the Group-by function
1
18
If you want to sort the data at an even finer level, you can
repeat steps 3 and 4 and drag another column heading to
the sort area.
Viewing Data
19
20
Select Average and click OK. The value appears just below
the Grand Summaries row. You can re-size the column
width to view the entire number This following figure
shows the average value for OrderQty.
Click OK.
Viewing Data
21
Click the list arrow and select an item from the list.
22
If you select the (Custom) item from the list, you can
further refine your search in the Custom dialog box.
This example shows a search for two different area
codes.
Discarding Changes
If you need to discard the changes made to grid values, click
Retrieve. This action reloads the table values from the
database and discards any changes. You can also initiate the
action by using a script that sets the CmdRetrieve_dg
property to True.
Viewing Errors
23
Viewing Errors
You can manually display or close the Status panel in the
lower part of the grid display area. The status panel can also
automatically appear when an error occurs. However, after
the panel appears, it remains on view.
If a command object is successful, the message "Success"
appears in the Status panel. If the panel is closed, "Success"
messages do not appear for successful command objects.
To close the panel, click the double-arrow icon at the right of
the panel. To open the panel on demand, right-click and
select Show Status.
Note The error panel display does not change the overall area
occupied by the grid symbol.
24
Tip After you modify cells in the grid and write them back to the
database, you should also verify that the data is correctly written.
In certain cases, such as a database table with an automatically
incrementing primary key or interdependent cells, the grid does
not show the true contents of the database table after you write
back to it. Also, no error message is shown. It is recommended
that you execute a retrieve or auto refresh command after writing
to the database to make sure it is showing the current data.
If the write process fails, you can view the status in the Error
panel. You can also monitor the StatusDesc_dg, and
StatusError_dg properties by using text fields on the InTouch
window for run-time display.
To make a change to data in the data grid
1
Click Runtime.
25
Select the phone number that you must modify. The area
becomes editable.
Click Write.
26
27
Appendix A
Custom Properties for the
SQLDataGrid Symbol
Description
Authentication_dg
AutoRefresh_dg
AutoRefreshDuration_dg
28
Property Name
Description
ButtonPanelHide_dg
CmdCancel_dg
CmdClear_dg
CmdCopy_dg
CmdLogDiagnostics_dg
CmdPageFirst_dg
CmdPageLast_dg
CmdPageNext_dg
CmdPagePrev_dg
CmdPaste_dg
29
Property Name
Description
CmdRefresh_dg
CmdResetDiagnostics_dg
CmdRetrieve_dg
CmdTestConnection_dg
CmdWrite_dg
ColumnAggregateEnable_dg
ColumnFiltering_dg
ColumnGroupingEnable_dg
30
Property Name
Description
ComboBoxListReadOnly_dg
ComboBoxListString_dg
ComboBoxPanelHide_dg
CommandTimeout_dg
ConfiguredDatabase_dg
ConfiguredDomain_dg
ConfiguredPassword_dg
ConfiguredReadOnly_dg
31
Property Name
Description
ConfiguredServer_dg
ConfiguredUser_dg
ConnectionTimeout_dg
ContextMenuEnable_dg
ErrorPanelDisable_dg
ErrorPanelShow_dg
FeatureButtonsHide_dg
FontBold_dg
32
Property Name
Description
FontName_dg
FontSize_dg
InstanceName_dg
MaxConnections_dg
RowCount_dg
RowLimit_dg
RowsChanged_dg
SelectedRowNumber_dg
33
Property Name
Description
SQLQuery_dg
SQLQueryCurrent_dg
SQLQueryPassThrough_dg
SQLQueryPending_dg
StatusDesc_dg
StatusError_dg
34
Property Name
Description
StatusIsError_dg
SupportThemes_dg
WriteButtonHide_dg
35
Index
aggregate values 19
authentication
modes 26
data, viewing 16
database
configuring connection 10
updating 23
discarding changes to grid values 22
Documentation 5
documentation conventions 5
C
changes
database 23
discarding 22
columns
aggregating values 19
grouping 17
moving 17
progressive filtering 20
rearraranging order 17
components of SQLDataGrid 7
configuration
custom properties 10
database connection 10
progressive column filtering 20
security 26
connection pooling 26
connection sharing 26
conventions, documentation 5
custom properties
alphabetical list 27
configuring 10
customizing the grid 10
E
errors, viewing 23
F
functions
aggregation 19
group-by 17
G
grid values, discarding changes 22
group-by function 17
grouping columns 17
I
InTouch window, hide and show
issues 16
M
moving columns 17
36
Index
O
order of columns, rearranging 17
P
pooling connections 26
progressive column filtering 20
properties, custom 10, 27
R
run-time interface
aggregating values 19
entering SQL queries 16
group-by function 17
progressive column filtering 20
viewing data 16
viewing errors 23
S
security, configuring 26
sharing conections 26
SQL queries, entering 16
SQLDataGrid
components 7
customizing 10
status panel 23
T
technical support, contacting 6
U
updates
database 23
views 24
V
views, updating 24
W
writing changes to database 23