Displaying SQL data in Wonderware Intouch

smakdown61

Member
Join Date
Aug 2009
Location
NC
Posts
90
I want to display the results from a SQL SELECT statement inside intouch. Looking for some kind of example as the SQL Access Manager doc is not very good other than describing parameters used. I have all the connection info and SELECT statement already written. Just need to know hot to get it on the screen. I'm not even sure what kind of object I'd drop into intouch for this.
 
You have to add bind lists to your project. These link the returned sql column data to a bindlist placeholder. Once its in the bind list tag you can move it to a tag that will be displayed. Typically you would loop through the rows in your dataset, return a single row result to the bind list tag, then move it to the permanent tag for display.

Might be able to dig up an example, no promises though.
 
You have to add bind lists to your project. These link the returned sql column data to a bindlist placeholder. Once its in the bind list tag you can move it to a tag that will be displayed. Typically you would loop through the rows in your dataset, return a single row result to the bind list tag, then move it to the permanent tag for display.

Might be able to dig up an example, no promises though.

Hmm that sounds like I would need a permanent tag for each row? My list size is dynamic so not sure how many rows it will end up being. Anyone have any success with that wwsqldatagrid active X control? I tried to configure that but it keeps timing out.
 
You would need tags for the max number of items returned.

So if you built a psudo 8x8 table to show the columns and rows returned, you would need 64 placeholders for displaying the data. You would only need 8 bind list tag definitions. If you have a lot of data to return,you can chew up your tags extremely quickly.

I've never looked into active-x controls as an alternative.
 
I use the wwGernericDataGrid.
Will display the results of your SQL query ok.

In Connection.
Under "SQL String" enter SELECT * FROM xxxx
Leave rest blank.

In Properties
"Connection String" enter sConnectionString

On open page with grid 5 on a page.

DataSourceDSN = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=xxxxx";

sConnectionString = DataSourceDSN;
#Grid5.ConnectWithString(sConnectionString);
#Grid5.SQLString = "SELECT * FROM xxxxx";
#Grid5.execute();

Replace the xxxxx with your database.
That should display something ok.
 

Similar Topics

Hey everyone and anyone that can lend a helping hand. I have a project that I am being asked to add some animations of Solidworks or "3D" models...
Replies
9
Views
346
Using FTview ME to create an HMI screen. Simplest task is giving me trouble. How do I create an HMI tag that will allow the name of the current...
Replies
3
Views
134
Hello Folks, plc : micrologix 1500 The analog output from the loadcell is given to the plc. Using the SCP function I have scaled it into an...
Replies
3
Views
767
Hi Everyone, I am hoping a Red Lion Expert can point me in the right direction. I am experimenting with data logging on a CR3000 10" screen...
Replies
4
Views
609
I’m a bit stuck on HMI (KTP-1200) programming… See the picture attached. The PASS or FAIL box should only appear when the toggle switch is...
Replies
7
Views
1,082
Back
Top Bottom