Show Trend with data from MS SQL-server

Discussion of application development using iX Developer, including but not limited to getting started, using the functions tab, properties, objects and installation.
Post Reply
bjornidar
Posts: 49
Joined: Thu Nov 17, 2011 2:10 am
Location: Norway
Contact:

Show Trend with data from MS SQL-server

Post by bjornidar »

Hi,

is it possible to connect the Trendview to another database than the integrated Compact edition?

Per now we are logging great amounts of data to a SQL database and wish to show this in a Trend in iX.

User avatar
Ron L.
Posts: 214
Joined: Fri Jul 15, 2011 3:21 pm

Re: Show Trend with data from MS SQL-server

Post by Ron L. »

Yes, this should be possible with C# scripting by incorporating compatible methods from the System.Data.SqlClient Namespace.
http://msdn.microsoft.com/en-us/library ... 90%29.aspx

The SqlConnection class can connect to SQL Server Databases.
http://msdn.microsoft.com/en-us/library ... 90%29.aspx

Not all methods are available in the .NET Compact Framework so look for the mobile icon next to the method to see if it's available.
http://msdn.microsoft.com/en-us/library ... 90%29.aspx

You can use "Script Modules" in iX Developer Manual to put C# script.

Once you have written script to retrieve the data, copy values into tags by referencing the "Globals.Tags" area in iX Developer (i.e. Globals.Tags.Tag1.Value = 5;). Then make sure the tags you are updating are used by the TrendChart.
Best Regards,

Beijer Electronics, Inc.
Ron Lloyd | Applications Engineer

Post Reply