{"id":396,"date":"2019-03-25T17:30:38","date_gmt":"2019-03-25T20:30:38","guid":{"rendered":"http:\/\/xexeu.elipse.com.br\/pt\/using-sql-server-with-e3\/"},"modified":"2019-07-05T16:41:34","modified_gmt":"2019-07-05T19:41:34","slug":"using-sql-server-with-e3","status":"publish","type":"post","link":"https:\/\/kb.elipse.com.br\/en\/using-sql-server-with-e3\/","title":{"rendered":"Using SQL Server with E3."},"content":{"rendered":"<div align=\"justify\">\n<p>This article illustrates how to set up a connection to an SQL Server database in E3, as well as recording data and applying queries for being viewed on screens.<\/p>\n<p>For this example&#8217;s purposes, we will consider the SQL Server has been installed in the computer and the application&#8217;s database has already been created.<\/p>\n<p><u><b>Creating a database connection:<\/b><\/u><\/p>\n<p>After creating the E3 application, insert a DBServer object and set it up according to the database you want to communicate with.<\/p>\n<div align=\"center\"><img loading=\"lazy\" title=\"\" src=\"http:\/\/kb.elipse.com.br\/pt-br\/images\/ID149\/Figura1.PNG\" alt=\"\" width=\"465\" height=\"527\" align=\"Baseline\" border=\"0\" \/><\/div>\n<p>To test the connection, click <b>Test Connection<\/b> button. If communication was successful, the following message will be displayed:<\/p>\n<div align=\"center\"><img loading=\"lazy\" title=\"\" src=\"http:\/\/kb.elipse.com.br\/pt-br\/images\/ID149\/Figura2.PNG\" alt=\"\" width=\"336\" height=\"126\" align=\"Baseline\" border=\"0\" \/><\/div>\n<p><u><b>Creating a historic to store values in the database:<\/b><\/u><\/p>\n<p>For this example, three Demo tags were designed to simulate random values of temperature, and then be recorded in the database. Insert a historic and add three fields. Set the source for each.<\/p>\n<div align=\"center\"><img loading=\"lazy\" title=\"\" src=\"http:\/\/kb.elipse.com.br\/pt-br\/images\/ID149\/Figura3.PNG\" alt=\"\" width=\"550\" height=\"112\" align=\"Baseline\" border=\"0\" \/><\/div>\n<p>After that, go to the historic&#8217;s properties and set the database server name (in our case, <b>DB1<\/b>). Then, enter the table name to store data, and time to save a new record. See the example below:<\/p>\n<div align=\"center\"><img loading=\"lazy\" title=\"\" src=\"http:\/\/kb.elipse.com.br\/pt-br\/images\/ID149\/Figura4.PNG\" alt=\"\" width=\"465\" height=\"527\" align=\"Baseline\" border=\"0\" \/><\/div>\n<p>Click <b>Create Table<\/b> to create the table in the database. If implemented successfully, the following message will be displayed:<\/p>\n<div align=\"center\"><img loading=\"lazy\" title=\"\" src=\"http:\/\/kb.elipse.com.br\/pt-br\/images\/ID149\/Figura5.PNG\" alt=\"\" width=\"341\" height=\"126\" align=\"Baseline\" border=\"0\" \/><\/div>\n<p><u><b>Displaying recorded data:<\/b><\/u><\/p>\n<p>To show the data recorded in the database, we will use the E3Browser object, which will also have an E3Query object responsible for collecting data in the database.<\/p>\n<p>First, add an E3Browser to the screen and access its properties. On <b>Query <\/b>tab, select the query <b>Query1 <\/b>and click <b>Configure<\/b>. Select the database server which was set up as below:<\/p>\n<div align=\"center\"><img loading=\"lazy\" title=\"\" src=\"http:\/\/kb.elipse.com.br\/pt-br\/images\/ID149\/Figura6.PNG\" alt=\"\" width=\"323\" height=\"164\" align=\"Baseline\" border=\"0\" \/><\/div>\n<p>On the next window, select the table that stores temperature data. As seen above, the table name is <b>TesteTemp<\/b>.<\/p>\n<div align=\"center\"><img loading=\"lazy\" title=\"\" src=\"http:\/\/kb.elipse.com.br\/pt-br\/images\/ID149\/Figura7.PNG\" alt=\"\" width=\"248\" height=\"328\" align=\"Baseline\" border=\"0\" \/><\/div>\n<p>In the query settings window, select the fields of the table you want to visualize. In this case, we checked <b>E3TimeStamp<\/b>, <b>Temp01<\/b>, <b>Temp02<\/b>, and <b>Temp03<\/b>. In the <b>Title <\/b>column, the following fields were given alias: <b>Temperature1<\/b>, <b>Temperature2<\/b>, and <b>Temperature3<\/b>, respectively.<\/p>\n<div align=\"center\"><img loading=\"lazy\" title=\"\" src=\"http:\/\/kb.elipse.com.br\/pt-br\/images\/ID149\/Figura8.PNG\" alt=\"\" width=\"550\" height=\"383\" align=\"Baseline\" border=\"0\" \/><\/div>\n<p><b>Note<\/b>: You can edit these SQL commands directly. To do that, you will need to access the SQL tab and implement SQL commands. Tip: Use the SQL Server Tool (SQL Server Management Studio) to create these queries.<\/p>\n<p>On <b>Visualize <\/b>tab, you can run the query to see if the data is being retrieved correctly. Since the application hasn&#8217;t been executed yet, this table is empty, then the columns will appear with no data on them.<\/p>\n<div align=\"center\"><img loading=\"lazy\" title=\"\" src=\"http:\/\/kb.elipse.com.br\/pt-br\/images\/ID149\/Figura9.PNG\" alt=\"\" width=\"550\" height=\"383\" align=\"Baseline\" border=\"0\" \/><\/div>\n<p>Back to E3Browser properties, go to <b>Options <\/b>tab and check <b>Refresh every &#8230; ms<\/b>, setting it to 5000 ms.<\/p>\n<div align=\"center\"><img loading=\"lazy\" title=\"\" src=\"http:\/\/kb.elipse.com.br\/pt-br\/images\/ID149\/Figura10.PNG\" alt=\"\" width=\"443\" height=\"312\" align=\"Baseline\" border=\"0\" \/><\/div>\n<p>After that, save and run the application. On the screen, the stored data will be displayed with automatic refreshing every 5 seconds.<\/p>\n<div align=\"center\"><img loading=\"lazy\" title=\"\" src=\"http:\/\/kb.elipse.com.br\/pt-br\/images\/ID149\/Figura11.PNG\" alt=\"\" width=\"550\" height=\"413\" align=\"Baseline\" border=\"0\" \/><\/div>\n<\/div>\n<h3 style=\"text-align: left;\" align=\"center\">Attachments:<\/h3>\n<p><a href=\"\/wp-content\/uploads\/2019\/03\/SQLServer.zip\">SQLServer.zip<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article illustrates how to set up a connection to an SQL Server database in E3, as well as recording data and applying queries for being viewed on screens. For&hellip;<\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0},"categories":[735],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Using SQL Server with E3. - Elipse Knowledgebase<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/kb.elipse.com.br\/en\/using-sql-server-with-e3\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using SQL Server with E3.\" \/>\n<meta property=\"og:description\" content=\"This article illustrates how to set up a connection to an SQL Server database in E3, as well as recording data and applying queries for being viewed on screens. For&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kb.elipse.com.br\/en\/using-sql-server-with-e3\/\" \/>\n<meta property=\"og:site_name\" content=\"Elipse Knowledgebase\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/www.facebook.com\/elipsesoftware\" \/>\n<meta property=\"article:published_time\" content=\"2019-03-25T20:30:38+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-07-05T19:41:34+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/kb.elipse.com.br\/pt-br\/images\/ID149\/Figura1.PNG\" \/>\n<meta name=\"author\" content=\"Renan De Rossi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Renan De Rossi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/using-sql-server-with-e3\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/using-sql-server-with-e3\/\"},\"author\":{\"name\":\"Renan De Rossi\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/05f0d8f49e5ffe573156b4bd742c627f\"},\"headline\":\"Using SQL Server with E3.\",\"datePublished\":\"2019-03-25T20:30:38+00:00\",\"dateModified\":\"2019-07-05T19:41:34+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/using-sql-server-with-e3\/\"},\"wordCount\":443,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#organization\"},\"articleSection\":[\"DataBases\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/kb.elipse.com.br\/en\/using-sql-server-with-e3\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/using-sql-server-with-e3\/\",\"url\":\"https:\/\/kb.elipse.com.br\/en\/using-sql-server-with-e3\/\",\"name\":\"[:pt]Using SQL Server with E3.[:] - Elipse Knowledgebase\",\"isPartOf\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#website\"},\"datePublished\":\"2019-03-25T20:30:38+00:00\",\"dateModified\":\"2019-07-05T19:41:34+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/using-sql-server-with-e3\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/kb.elipse.com.br\/en\/using-sql-server-with-e3\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/using-sql-server-with-e3\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"In\u00edcio\",\"item\":\"https:\/\/kb.elipse.com.br\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Using SQL Server with E3.\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/kb.elipse.com.br\/#website\",\"url\":\"https:\/\/kb.elipse.com.br\/\",\"name\":\"Elipse Knowledgebase\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/kb.elipse.com.br\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/kb.elipse.com.br\/#organization\",\"name\":\"Elipse Software\",\"url\":\"https:\/\/kb.elipse.com.br\/\",\"sameAs\":[\"http:\/\/www.facebook.com\/elipsesoftware\"],\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png\",\"contentUrl\":\"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png\",\"width\":161,\"height\":58,\"caption\":\"Elipse Software\"},\"image\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/05f0d8f49e5ffe573156b4bd742c627f\",\"name\":\"Renan De Rossi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/39b08f7b309bb6a0abb90e1f09048d80?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/39b08f7b309bb6a0abb90e1f09048d80?s=96&d=mm&r=g\",\"caption\":\"Renan De Rossi\"},\"url\":\"https:\/\/kb.elipse.com.br\/en\/author\/renan\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using SQL Server with E3. - Elipse Knowledgebase","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/kb.elipse.com.br\/en\/using-sql-server-with-e3\/","og_locale":"en_US","og_type":"article","og_title":"[:pt]Using SQL Server with E3.[:] - Elipse Knowledgebase","og_description":"This article illustrates how to set up a connection to an SQL Server database in E3, as well as recording data and applying queries for being viewed on screens. For&hellip;","og_url":"https:\/\/kb.elipse.com.br\/en\/using-sql-server-with-e3\/","og_site_name":"Elipse Knowledgebase","article_publisher":"http:\/\/www.facebook.com\/elipsesoftware","article_published_time":"2019-03-25T20:30:38+00:00","article_modified_time":"2019-07-05T19:41:34+00:00","og_image":[{"url":"http:\/\/kb.elipse.com.br\/pt-br\/images\/ID149\/Figura1.PNG"}],"author":"Renan De Rossi","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Renan De Rossi","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kb.elipse.com.br\/en\/using-sql-server-with-e3\/#article","isPartOf":{"@id":"https:\/\/kb.elipse.com.br\/en\/using-sql-server-with-e3\/"},"author":{"name":"Renan De Rossi","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/05f0d8f49e5ffe573156b4bd742c627f"},"headline":"Using SQL Server with E3.","datePublished":"2019-03-25T20:30:38+00:00","dateModified":"2019-07-05T19:41:34+00:00","mainEntityOfPage":{"@id":"https:\/\/kb.elipse.com.br\/en\/using-sql-server-with-e3\/"},"wordCount":443,"commentCount":0,"publisher":{"@id":"https:\/\/kb.elipse.com.br\/#organization"},"articleSection":["DataBases"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/kb.elipse.com.br\/en\/using-sql-server-with-e3\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/kb.elipse.com.br\/en\/using-sql-server-with-e3\/","url":"https:\/\/kb.elipse.com.br\/en\/using-sql-server-with-e3\/","name":"[:pt]Using SQL Server with E3.[:] - Elipse Knowledgebase","isPartOf":{"@id":"https:\/\/kb.elipse.com.br\/#website"},"datePublished":"2019-03-25T20:30:38+00:00","dateModified":"2019-07-05T19:41:34+00:00","breadcrumb":{"@id":"https:\/\/kb.elipse.com.br\/en\/using-sql-server-with-e3\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kb.elipse.com.br\/en\/using-sql-server-with-e3\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/kb.elipse.com.br\/en\/using-sql-server-with-e3\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"In\u00edcio","item":"https:\/\/kb.elipse.com.br\/en\/"},{"@type":"ListItem","position":2,"name":"Using SQL Server with E3."}]},{"@type":"WebSite","@id":"https:\/\/kb.elipse.com.br\/#website","url":"https:\/\/kb.elipse.com.br\/","name":"Elipse Knowledgebase","description":"","publisher":{"@id":"https:\/\/kb.elipse.com.br\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kb.elipse.com.br\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/kb.elipse.com.br\/#organization","name":"Elipse Software","url":"https:\/\/kb.elipse.com.br\/","sameAs":["http:\/\/www.facebook.com\/elipsesoftware"],"logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/","url":"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png","contentUrl":"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png","width":161,"height":58,"caption":"Elipse Software"},"image":{"@id":"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/05f0d8f49e5ffe573156b4bd742c627f","name":"Renan De Rossi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/39b08f7b309bb6a0abb90e1f09048d80?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/39b08f7b309bb6a0abb90e1f09048d80?s=96&d=mm&r=g","caption":"Renan De Rossi"},"url":"https:\/\/kb.elipse.com.br\/en\/author\/renan\/"}]}},"_links":{"self":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/396"}],"collection":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/comments?post=396"}],"version-history":[{"count":3,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/396\/revisions"}],"predecessor-version":[{"id":7627,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/396\/revisions\/7627"}],"wp:attachment":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/media?parent=396"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/categories?post=396"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/tags?post=396"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}