{"id":8270,"date":"2019-08-14T15:40:02","date_gmt":"2019-08-14T18:40:02","guid":{"rendered":"http:\/\/kb.elipse.com.br\/en\/?p=8270"},"modified":"2019-08-16T14:04:02","modified_gmt":"2019-08-16T17:04:02","slug":"demo-applications-reading-data-from-an-sql-database-via-vbscript-driver","status":"publish","type":"post","link":"https:\/\/kb.elipse.com.br\/en\/demo-applications-reading-data-from-an-sql-database-via-vbscript-driver\/","title":{"rendered":"Demo application: Reading data from an SQL database via VBScript driver."},"content":{"rendered":"<p>This article uses a demo application to illustrate how to read data from an SQL database via <a href=\"https:\/\/www.elipse.com.br\/en\/downloads\/?cat=48&#038;key=vbscript&#038;language=enus#header-main\" target=\"_blank\" rel=\"noopener noreferrer\">VBScript driver<\/a>, by Elipse Software.<\/p>\n<h2><strong><u>Introduction<\/u><\/strong><\/h2>\n<p>Sometimes, you will need your Elipse application to read the data from a database periodically, as if it were an I\/O driver; in these cases, we recommend using Elipse Software&#8217;s VBScript driver. Consequently, when you create a script to read this data directly from the VBScript driver (IOServer.exe), the script will keep synchronous operations (<em>GetADORecordSet<\/em>) from influencing the main thread of E3\/Power (E3Run.exe).<\/p>\n<h2><strong><u>Demo application<br \/>\n<\/u><\/strong><\/h2>\n<p>In the demo application below, we illustrate how to read data from a Microsoft SQL database via VBScript driver. In the example:<\/p>\n<ul>\n<li>the reading takes place periodically, and<\/li>\n<li>read values are attributed to the I\/O driver&#8217;s IOTags.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-7847\" src=\"http:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/07\/1_7767EN.png\" alt=\"\" width=\"873\" height=\"204\" \/><\/p>\n<h2><strong><u>Setting up and using the application to read data from an SQL database via VBScript driver<br \/>\n<\/u><\/strong><\/h2>\n<p>To make sure the application works properly, you must set up the connection parameters with the database; as a result, you will be able to communicate with the SQL database.<\/p>\n<p>The object seen in the figure below is the database:<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-7848\" src=\"http:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/07\/2_7767EN.png\" alt=\"\" width=\"1161\" height=\"613\" \/><\/p>\n<p>Then, the next figure shows the SQLRead driver script:<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-7849\" src=\"http:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/07\/3_7767EN.png\" alt=\"\" width=\"641\" height=\"638\" \/><\/p>\n<p>The application has an IOTag called <em>ReadStatus,<\/em> which returns the status of the last read. The possible values for this tag are:<\/p>\n<ul>\n<li><em>ReadStatus<\/em> = 0 (Successful read!)<\/li>\n<li><em>ReadStatus<\/em> = 1 (Failed read!)<\/li>\n<\/ul>\n<p>Additionally, you can also set up a read scan period via an IOTag field called <em>ReadPeriod<\/em>.<\/p>\n<h3><\/h3>\n<h3><b>Attachments:<\/b><\/h3>\n<p><a href=\"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/07\/7767\/AppExemploReadSQL.zip\">AppExemploReadSQL.zip<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article uses a demo application to illustrate how to read data from an SQL database via VBScript driver, by Elipse Software. Introduction Sometimes, you will need your Elipse application&hellip;<\/p>\n","protected":false},"author":13,"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,800,825],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Demo application: how to read an SQL BD via Elipse VBScript driver<\/title>\n<meta name=\"description\" content=\"This aticle presents a demo application that shows how to read data from an SQL database via VBScript driver, by Elipse Software.\" \/>\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\/demo-applications-reading-data-from-an-sql-database-via-vbscript-driver\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Demo application: how to read an SQL BD via Elipse VBScript driver\" \/>\n<meta property=\"og:description\" content=\"This aticle presents a demo application that shows how to read data from an SQL database via VBScript driver, by Elipse Software.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kb.elipse.com.br\/en\/demo-applications-reading-data-from-an-sql-database-via-vbscript-driver\/\" \/>\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-08-14T18:40:02+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-08-16T17:04:02+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/07\/1_7767EN.png\" \/>\n<meta name=\"author\" content=\"Eduardo Grazziotin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Eduardo Grazziotin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/demo-applications-reading-data-from-an-sql-database-via-vbscript-driver\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/demo-applications-reading-data-from-an-sql-database-via-vbscript-driver\/\"},\"author\":{\"name\":\"Eduardo Grazziotin\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/f9fc2442228f8cc06308387a6725ef03\"},\"headline\":\"Demo application: Reading data from an SQL database via VBScript driver.\",\"datePublished\":\"2019-08-14T18:40:02+00:00\",\"dateModified\":\"2019-08-16T17:04:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/demo-applications-reading-data-from-an-sql-database-via-vbscript-driver\/\"},\"wordCount\":268,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#organization\"},\"articleSection\":[\"DataBases\",\"Elipse VBScript\",\"Elipse Power\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/kb.elipse.com.br\/en\/demo-applications-reading-data-from-an-sql-database-via-vbscript-driver\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/demo-applications-reading-data-from-an-sql-database-via-vbscript-driver\/\",\"url\":\"https:\/\/kb.elipse.com.br\/en\/demo-applications-reading-data-from-an-sql-database-via-vbscript-driver\/\",\"name\":\"Demo application: how to read an SQL BD via Elipse VBScript driver\",\"isPartOf\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#website\"},\"datePublished\":\"2019-08-14T18:40:02+00:00\",\"dateModified\":\"2019-08-16T17:04:02+00:00\",\"description\":\"This aticle presents a demo application that shows how to read data from an SQL database via VBScript driver, by Elipse Software.\",\"breadcrumb\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/demo-applications-reading-data-from-an-sql-database-via-vbscript-driver\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/kb.elipse.com.br\/en\/demo-applications-reading-data-from-an-sql-database-via-vbscript-driver\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/demo-applications-reading-data-from-an-sql-database-via-vbscript-driver\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"In\u00edcio\",\"item\":\"https:\/\/kb.elipse.com.br\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Demo application: Reading data from an SQL database via VBScript driver.\"}]},{\"@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\/f9fc2442228f8cc06308387a6725ef03\",\"name\":\"Eduardo Grazziotin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/47913ac4c8f427d44c6391bff49b275f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/47913ac4c8f427d44c6391bff49b275f?s=96&d=mm&r=g\",\"caption\":\"Eduardo Grazziotin\"},\"url\":\"https:\/\/kb.elipse.com.br\/en\/author\/eduardo\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Demo application: how to read an SQL BD via Elipse VBScript driver","description":"This aticle presents a demo application that shows how to read data from an SQL database via VBScript driver, by Elipse Software.","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\/demo-applications-reading-data-from-an-sql-database-via-vbscript-driver\/","og_locale":"en_US","og_type":"article","og_title":"Demo application: how to read an SQL BD via Elipse VBScript driver","og_description":"This aticle presents a demo application that shows how to read data from an SQL database via VBScript driver, by Elipse Software.","og_url":"https:\/\/kb.elipse.com.br\/en\/demo-applications-reading-data-from-an-sql-database-via-vbscript-driver\/","og_site_name":"Elipse Knowledgebase","article_publisher":"http:\/\/www.facebook.com\/elipsesoftware","article_published_time":"2019-08-14T18:40:02+00:00","article_modified_time":"2019-08-16T17:04:02+00:00","og_image":[{"url":"http:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/07\/1_7767EN.png"}],"author":"Eduardo Grazziotin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Eduardo Grazziotin","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kb.elipse.com.br\/en\/demo-applications-reading-data-from-an-sql-database-via-vbscript-driver\/#article","isPartOf":{"@id":"https:\/\/kb.elipse.com.br\/en\/demo-applications-reading-data-from-an-sql-database-via-vbscript-driver\/"},"author":{"name":"Eduardo Grazziotin","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/f9fc2442228f8cc06308387a6725ef03"},"headline":"Demo application: Reading data from an SQL database via VBScript driver.","datePublished":"2019-08-14T18:40:02+00:00","dateModified":"2019-08-16T17:04:02+00:00","mainEntityOfPage":{"@id":"https:\/\/kb.elipse.com.br\/en\/demo-applications-reading-data-from-an-sql-database-via-vbscript-driver\/"},"wordCount":268,"commentCount":0,"publisher":{"@id":"https:\/\/kb.elipse.com.br\/#organization"},"articleSection":["DataBases","Elipse VBScript","Elipse Power"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/kb.elipse.com.br\/en\/demo-applications-reading-data-from-an-sql-database-via-vbscript-driver\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/kb.elipse.com.br\/en\/demo-applications-reading-data-from-an-sql-database-via-vbscript-driver\/","url":"https:\/\/kb.elipse.com.br\/en\/demo-applications-reading-data-from-an-sql-database-via-vbscript-driver\/","name":"Demo application: how to read an SQL BD via Elipse VBScript driver","isPartOf":{"@id":"https:\/\/kb.elipse.com.br\/#website"},"datePublished":"2019-08-14T18:40:02+00:00","dateModified":"2019-08-16T17:04:02+00:00","description":"This aticle presents a demo application that shows how to read data from an SQL database via VBScript driver, by Elipse Software.","breadcrumb":{"@id":"https:\/\/kb.elipse.com.br\/en\/demo-applications-reading-data-from-an-sql-database-via-vbscript-driver\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kb.elipse.com.br\/en\/demo-applications-reading-data-from-an-sql-database-via-vbscript-driver\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/kb.elipse.com.br\/en\/demo-applications-reading-data-from-an-sql-database-via-vbscript-driver\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"In\u00edcio","item":"https:\/\/kb.elipse.com.br\/en\/"},{"@type":"ListItem","position":2,"name":"Demo application: Reading data from an SQL database via VBScript driver."}]},{"@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\/f9fc2442228f8cc06308387a6725ef03","name":"Eduardo Grazziotin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/47913ac4c8f427d44c6391bff49b275f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/47913ac4c8f427d44c6391bff49b275f?s=96&d=mm&r=g","caption":"Eduardo Grazziotin"},"url":"https:\/\/kb.elipse.com.br\/en\/author\/eduardo\/"}]}},"_links":{"self":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/8270"}],"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\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/comments?post=8270"}],"version-history":[{"count":7,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/8270\/revisions"}],"predecessor-version":[{"id":8330,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/8270\/revisions\/8330"}],"wp:attachment":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/media?parent=8270"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/categories?post=8270"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/tags?post=8270"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}