{"id":10448,"date":"2020-04-06T15:31:26","date_gmt":"2020-04-06T18:31:26","guid":{"rendered":"http:\/\/kb.elipse.com.br\/en\/?p=10448"},"modified":"2020-04-06T15:31:26","modified_gmt":"2020-04-06T18:31:26","slug":"returning-a-value-not-recorded-in-the-database","status":"publish","type":"post","link":"https:\/\/kb.elipse.com.br\/en\/returning-a-value-not-recorded-in-the-database\/","title":{"rendered":"Returning a value not recorded in the Database."},"content":{"rendered":"<p>This article illustrates how to return a value that has not been recorded in the <a href=\"https:\/\/www.elipse.com.br\/en\/\" target=\"_blank\" rel=\"noopener noreferrer\">Elipse E3<\/a> Database yet.<\/p>\n<p>Many times, you will need to check if a certain value has already been recorded in the Database before you try to add it. This is very important, especially when using a primary key.<\/p>\n<p>First of all, <em>SetVariableValue<\/em> method atributes the value of a variable created on the Query; thus, you can inform this value as a filter or parameter before the Query takes place. You must also set up the variable&#8217;s name (<em>VarName<\/em>) and its (<em>Value<\/em>), which can be a number, a text, or a timestamp.<\/p>\n<p><em>EOF <\/em>property, from <em>GetADORecordSet <\/em>method<em>,<\/em> returns one of the following values: <strong>True<\/strong>, if the current record position is after the last onde, and <strong>False<\/strong>, if the current record position is before the last one.<\/p>\n<p>With these two methods as resources, you must first search for the desired word:<\/p>\n<div class=\"EnlighterJSWrapper enlighterEnlighterJSWrapper\">\n<ol class=\"hoverEnabled enlighterEnlighterJS EnlighterJS\">\n<li class=\" odd\"><span class=\"\">Set Consulta = Screen.<\/span><span class=\"kw1\">Item<\/span><span class=\"br0\">(<\/span><span class=\"st0\">&#8220;ExistConsult&#8221;<\/span><span class=\"br0\">)<\/span><\/li>\n<li class=\" even\"><span class=\"\">&#8216;Screen.<\/span><span class=\"kw1\">Item<\/span><span class=\"br0\">(<\/span><span class=\"st0\">&#8220;ExistConsult&#8221;<\/span><span class=\"br0\">)<\/span><span class=\"\">.<\/span><span class=\"kw1\">SetVariableValue<\/span><span class=\"br0\">(<\/span><span class=\"\">VarName, Value<\/span><span class=\"br0\">)<\/span><\/li>\n<li class=\" odd\"><span class=\"\">Consulta.SetVariableValue <\/span><span class=\"st0\">&#8220;office&#8221;<\/span><span class=\"\">, Screen.<\/span><span class=\"kw1\">Item<\/span><span class=\"br0\">(<\/span><span class=\"st0\">&#8220;TextExist&#8221;<\/span><span class=\"br0\">)<\/span><span class=\"\">.Value<\/span><\/li>\n<\/ol>\n<\/div>\n<p>If you can&#8217;t retrieve the word, <em>EOF <\/em>property, from <em>GetADORecordSet <\/em>method, returns <strong>True<\/strong>:<\/p>\n<div class=\"EnlighterJSWrapper enlighterEnlighterJSWrapper\">\n<ol class=\"hoverEnabled enlighterEnlighterJS EnlighterJS\">\n<li class=\" odd\"><span class=\"\">set RS = Consulta.<\/span><span class=\"kw1\">GetADORecordset<\/span><span class=\"br0\">(<\/span><span class=\"br0\">)<\/span><\/li>\n<li class=\" even\"><span class=\"\">If RS.eof = true Then<\/span><\/li>\n<li class=\" odd\"><span class=\"\"> msgbox <\/span><span class=\"st0\">&#8220;The office does not exist&#8221;<\/span><\/li>\n<li class=\" even\"><span class=\"\">Else<\/span><\/li>\n<li class=\" odd\"><span class=\"\"> msgbox <\/span><span class=\"st0\">&#8220;The office exists&#8221;<\/span><\/li>\n<li class=\" even\"><span class=\"\">end if<\/span><\/li>\n<\/ol>\n<\/div>\n<p>Therefore, you can indicate to the user if the value has already been recorded to the Database or not, or rather, of it will return a value that hasn&#8217;t been recorded in the Database.<\/p>\n<p>Attached to this article is a demo application developed with Elipse <strong>E3 v5.0.437<\/strong>.<\/p>\n<h3><\/h3>\n<h3><strong>Related Articles:<\/strong><\/h3>\n<p class=\"entry-title\"><a href=\"https:\/\/kb.elipse.com.br\/en\/basic-vbscript-for-elipse-e3-lesson-7-getadorecordset\/\" target=\"_blank\" rel=\"noopener noreferrer\">Basic VBScript for Elipse E3: Lesson 7 \u2013 GetADORecordSet<\/a><\/p>\n<p class=\"entry-title\"><a href=\"https:\/\/kb.elipse.com.br\/en\/using-databases-in-e3-chapter-6-editing-records\/\" target=\"_blank\" rel=\"noopener noreferrer\">Using Databases in E3: Chapter 6 \u2013 Editing Records<\/a><\/p>\n<h3><\/h3>\n<h3>Attachments:<\/h3>\n<p><a href=\"http:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/11\/9489\/9489.zip\">9489.zip<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article illustrates how to return a value that has not been recorded in the Elipse E3 Database yet. Many times, you will need to check if a certain value&hellip;<\/p>\n","protected":false},"author":24,"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,743,730],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to return a value not recorded in Elipse E3&#039;s Database.<\/title>\n<meta name=\"description\" content=\"This article illustrates how to return a value that has not been recorded in the Elipse E3 Database yet, before you try to add it.\" \/>\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\/returning-a-value-not-recorded-in-the-database\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to return a value not recorded in Elipse E3&#039;s Database.\" \/>\n<meta property=\"og:description\" content=\"This article illustrates how to return a value that has not been recorded in the Elipse E3 Database yet, before you try to add it.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kb.elipse.com.br\/en\/returning-a-value-not-recorded-in-the-database\/\" \/>\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=\"2020-04-06T18:31:26+00:00\" \/>\n<meta name=\"author\" content=\"Lucas Angelo dos Santos\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Lucas Angelo dos Santos\" \/>\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\/returning-a-value-not-recorded-in-the-database\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/returning-a-value-not-recorded-in-the-database\/\"},\"author\":{\"name\":\"Lucas Angelo dos Santos\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/8274d4e8758d0bba9797ed62ca568851\"},\"headline\":\"Returning a value not recorded in the Database.\",\"datePublished\":\"2020-04-06T18:31:26+00:00\",\"dateModified\":\"2020-04-06T18:31:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/returning-a-value-not-recorded-in-the-database\/\"},\"wordCount\":285,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#organization\"},\"articleSection\":[\"DataBases\",\"E3Query\",\"Elipse E3\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/kb.elipse.com.br\/en\/returning-a-value-not-recorded-in-the-database\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/returning-a-value-not-recorded-in-the-database\/\",\"url\":\"https:\/\/kb.elipse.com.br\/en\/returning-a-value-not-recorded-in-the-database\/\",\"name\":\"How to return a value not recorded in Elipse E3's Database.\",\"isPartOf\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#website\"},\"datePublished\":\"2020-04-06T18:31:26+00:00\",\"dateModified\":\"2020-04-06T18:31:26+00:00\",\"description\":\"This article illustrates how to return a value that has not been recorded in the Elipse E3 Database yet, before you try to add it.\",\"breadcrumb\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/returning-a-value-not-recorded-in-the-database\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/kb.elipse.com.br\/en\/returning-a-value-not-recorded-in-the-database\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/returning-a-value-not-recorded-in-the-database\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"In\u00edcio\",\"item\":\"https:\/\/kb.elipse.com.br\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Returning a value not recorded in the Database.\"}]},{\"@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\/8274d4e8758d0bba9797ed62ca568851\",\"name\":\"Lucas Angelo dos Santos\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/89d677b6c8a8d6a100499aaec8fb46f6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/89d677b6c8a8d6a100499aaec8fb46f6?s=96&d=mm&r=g\",\"caption\":\"Lucas Angelo dos Santos\"},\"url\":\"https:\/\/kb.elipse.com.br\/en\/author\/santos\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to return a value not recorded in Elipse E3's Database.","description":"This article illustrates how to return a value that has not been recorded in the Elipse E3 Database yet, before you try to add it.","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\/returning-a-value-not-recorded-in-the-database\/","og_locale":"en_US","og_type":"article","og_title":"How to return a value not recorded in Elipse E3's Database.","og_description":"This article illustrates how to return a value that has not been recorded in the Elipse E3 Database yet, before you try to add it.","og_url":"https:\/\/kb.elipse.com.br\/en\/returning-a-value-not-recorded-in-the-database\/","og_site_name":"Elipse Knowledgebase","article_publisher":"http:\/\/www.facebook.com\/elipsesoftware","article_published_time":"2020-04-06T18:31:26+00:00","author":"Lucas Angelo dos Santos","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Lucas Angelo dos Santos","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kb.elipse.com.br\/en\/returning-a-value-not-recorded-in-the-database\/#article","isPartOf":{"@id":"https:\/\/kb.elipse.com.br\/en\/returning-a-value-not-recorded-in-the-database\/"},"author":{"name":"Lucas Angelo dos Santos","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/8274d4e8758d0bba9797ed62ca568851"},"headline":"Returning a value not recorded in the Database.","datePublished":"2020-04-06T18:31:26+00:00","dateModified":"2020-04-06T18:31:26+00:00","mainEntityOfPage":{"@id":"https:\/\/kb.elipse.com.br\/en\/returning-a-value-not-recorded-in-the-database\/"},"wordCount":285,"commentCount":0,"publisher":{"@id":"https:\/\/kb.elipse.com.br\/#organization"},"articleSection":["DataBases","E3Query","Elipse E3"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/kb.elipse.com.br\/en\/returning-a-value-not-recorded-in-the-database\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/kb.elipse.com.br\/en\/returning-a-value-not-recorded-in-the-database\/","url":"https:\/\/kb.elipse.com.br\/en\/returning-a-value-not-recorded-in-the-database\/","name":"How to return a value not recorded in Elipse E3's Database.","isPartOf":{"@id":"https:\/\/kb.elipse.com.br\/#website"},"datePublished":"2020-04-06T18:31:26+00:00","dateModified":"2020-04-06T18:31:26+00:00","description":"This article illustrates how to return a value that has not been recorded in the Elipse E3 Database yet, before you try to add it.","breadcrumb":{"@id":"https:\/\/kb.elipse.com.br\/en\/returning-a-value-not-recorded-in-the-database\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kb.elipse.com.br\/en\/returning-a-value-not-recorded-in-the-database\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/kb.elipse.com.br\/en\/returning-a-value-not-recorded-in-the-database\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"In\u00edcio","item":"https:\/\/kb.elipse.com.br\/en\/"},{"@type":"ListItem","position":2,"name":"Returning a value not recorded in the Database."}]},{"@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\/8274d4e8758d0bba9797ed62ca568851","name":"Lucas Angelo dos Santos","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/89d677b6c8a8d6a100499aaec8fb46f6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/89d677b6c8a8d6a100499aaec8fb46f6?s=96&d=mm&r=g","caption":"Lucas Angelo dos Santos"},"url":"https:\/\/kb.elipse.com.br\/en\/author\/santos\/"}]}},"_links":{"self":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/10448"}],"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\/24"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/comments?post=10448"}],"version-history":[{"count":4,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/10448\/revisions"}],"predecessor-version":[{"id":10452,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/10448\/revisions\/10452"}],"wp:attachment":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/media?parent=10448"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/categories?post=10448"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/tags?post=10448"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}