{"id":3377,"date":"2019-03-25T17:44:00","date_gmt":"2019-03-25T20:44:00","guid":{"rendered":"http:\/\/xexeu.elipse.com.br\/pt\/manipulating-an-sql-database-in-e3\/"},"modified":"2019-07-05T15:39:25","modified_gmt":"2019-07-05T18:39:25","slug":"manipulating-an-sql-database-in-e3","status":"publish","type":"post","link":"https:\/\/kb.elipse.com.br\/en\/manipulating-an-sql-database-in-e3\/","title":{"rendered":"Manipulating an SQL Database in E3."},"content":{"rendered":"<div align=\"justify\">\n<p>Although Elipse E3 already lets you back up tables, these backup files are created in the same file where the data being used by the application is. In some cases, you will need to back up an entire database, but this feature hasn&#8217;t been implemented in E3 yet.<\/p>\n<p>This article then presents a simple alternative for backing up and restoring the database which does not require any knowledge of SQL commands. By the end of this article, you will find a module (library) developed by Elipse that can be used in your application.<\/p>\n<p><b>Requirements<\/b><\/p>\n<p>To do so, you will need to have <a href=\"http:\/\/kb.elipse.com.br\/pt-br\/questions\/2107\/Basic+VBScript+for+Elipse+E3%3A+Introduction\" target=\"_blank\" rel=\"noopener noreferrer\">basic VBScript knowledge<\/a>. In addition, you will also need these tools:<\/p>\n<ul>\n<li>SQL Server 2008 (Express, Standard, Enterprise) <a href=\"http:\/\/www.microsoft.com\/sqlserver\/2008\/en\/us\/\" target=\"_blank\" rel=\"noopener noreferrer\">Installed<\/a>.<\/li>\n<li>Microsoft SQL Server 2005 Backward Compatibility Components (<a href=\"http:\/\/download.microsoft.com\/download\/f\/7\/4\/f74cbdb1-87e2-4794-9186-e3ad6bd54b41\/SQLServer2005_BC.msi\" target=\"_blank\" rel=\"noopener noreferrer\">32 bits<\/a> or <a href=\"http:\/\/download.microsoft.com\/download\/f\/7\/4\/f74cbdb1-87e2-4794-9186-e3ad6bd54b41\/SQLServer2005_BC_x64.msi\" target=\"_blank\" rel=\"noopener noreferrer\">64 bits<\/a>).<\/li>\n<\/ul>\n<p><b>NOTE<\/b>: When using SQL Server 2005, the ActiveX SQL-DMO is also installed by default. You will only need to download it if your SQL Server 2005 installation has been customized.<\/p>\n<p>The other tools seen in this article are part of Elipse E3 and need no further download.<\/p>\n<p><b>Installing SQL Distributed Management Objects (SQL-DMO)<\/b><\/p>\n<p>If the SQL Server is already installed in your machine (local or remote), then you will need to install the ActiveX component that handles the database management objects.<\/p>\n<p>After downloading it, follow these guidelines:<\/p>\n<p>1. Click <b>Next <\/b>to start installation.<\/p>\n<div align=\"center\"><img loading=\"lazy\" title=\"\" src=\"http:\/\/kb.elipse.com.br\/pt-br\/images\/ID4228\/Fig1.bmp\" alt=\"\" width=\"500\" height=\"377\" align=\"baseline\" border=\"0\" \/><\/div>\n<p>2. Accept its license agreement.<\/p>\n<div align=\"center\"><img loading=\"lazy\" title=\"\" src=\"http:\/\/kb.elipse.com.br\/pt-br\/images\/ID4228\/Fig2.bmp\" alt=\"\" width=\"500\" height=\"377\" align=\"baseline\" border=\"0\" \/><\/div>\n<p>3. Set up both your name and you company&#8217;s name.<\/p>\n<div align=\"center\"><img loading=\"lazy\" title=\"\" src=\"http:\/\/kb.elipse.com.br\/pt-br\/images\/ID4228\/Fig3.bmp\" alt=\"\" width=\"500\" height=\"377\" align=\"baseline\" border=\"0\" \/><\/div>\n<p>4. Select the components to be installed. The only item you will need is SQL-DMO. Other tools can also be installed alongside it, but their uses will not be discussed in this article.<\/p>\n<div align=\"center\"><img loading=\"lazy\" title=\"\" src=\"http:\/\/kb.elipse.com.br\/pt-br\/images\/ID4228\/Fig4.bmp\" alt=\"\" width=\"500\" height=\"377\" align=\"baseline\" border=\"0\" \/><\/div>\n<p>5. Click <b>Install <\/b>to install the selected components.<\/p>\n<div align=\"center\"><img loading=\"lazy\" title=\"\" src=\"http:\/\/kb.elipse.com.br\/pt-br\/images\/ID4228\/Fig5.bmp\" alt=\"\" width=\"500\" height=\"377\" align=\"baseline\" border=\"0\" \/><\/div>\n<p>6. When the installation is complete, the following window will be displayed. Click Finish.<\/p>\n<div align=\"center\"><img loading=\"lazy\" title=\"\" src=\"http:\/\/kb.elipse.com.br\/pt-br\/images\/ID4228\/Fig6.bmp\" alt=\"\" width=\"500\" height=\"377\" align=\"baseline\" border=\"0\" \/><\/div>\n<p><b>Application<\/b><\/p>\n<p>A demo application was created to illustrate how to use <b>ManipulacaoDB <\/b>library to manipulate the databases in an SQL Server. Basically, the application allows users to create backups (programmed or not) and restore databases from a previously created backup.<\/p>\n<p><b><i>ManipulacaoDB <\/i>Library<\/b><\/p>\n<p>The ManipulacaoDB library comprised an XObject (<b>DadosManipulaBD<\/b>) and an XControl (<b>ManipulaBD<\/b>). In addition to these two objects, you must create a database in the application. This database will be used by the library to connect to the SQL Server.<\/p>\n<p><i><b>ManipulaBD<\/b><\/i>: User interface object. It contains scripts that execute tasks contained in the <b>DadosManipulaDB <\/b>data onject. This object also lists all databases existing in an SQL Server. To use this object, you must insert it onto a screen and set up <b>DadosManipulaDB <\/b>path (which must be inserted into a database) at <b>Source <\/b>property.<\/p>\n<p><i><b>DadosManupulaBD<\/b><\/i>: Contains the scripts for backing up and restoring data.<\/p>\n<h3>Attachments:<\/h3>\n<p><a href=\"\/wp-content\/uploads\/2019\/03\/RestoreBackupDB.zip\">RestoreBackupDB.zip<\/a><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Autor<br \/>\nRenato Souza<\/p>\n","protected":false},"author":1,"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>Manipulating an SQL Database in 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\/manipulating-an-sql-database-in-e3\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Manipulating an SQL Database in E3.\" \/>\n<meta property=\"og:description\" content=\"Autor Renato Souza\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kb.elipse.com.br\/en\/manipulating-an-sql-database-in-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:44:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-07-05T18:39:25+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/kb.elipse.com.br\/pt-br\/images\/ID4228\/Fig1.bmp\" \/>\n<meta name=\"author\" content=\"Elipse Software\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Elipse Software\" \/>\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\/manipulating-an-sql-database-in-e3\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/manipulating-an-sql-database-in-e3\/\"},\"author\":{\"name\":\"Elipse Software\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/def69ea453ea60b250497b89225a9f87\"},\"headline\":\"Manipulating an SQL Database in E3.\",\"datePublished\":\"2019-03-25T20:44:00+00:00\",\"dateModified\":\"2019-07-05T18:39:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/manipulating-an-sql-database-in-e3\/\"},\"wordCount\":438,\"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\/manipulating-an-sql-database-in-e3\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/manipulating-an-sql-database-in-e3\/\",\"url\":\"https:\/\/kb.elipse.com.br\/en\/manipulating-an-sql-database-in-e3\/\",\"name\":\"[:pt]Manipulating an SQL Database in E3.[:] - Elipse Knowledgebase\",\"isPartOf\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#website\"},\"datePublished\":\"2019-03-25T20:44:00+00:00\",\"dateModified\":\"2019-07-05T18:39:25+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/manipulating-an-sql-database-in-e3\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/kb.elipse.com.br\/en\/manipulating-an-sql-database-in-e3\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/manipulating-an-sql-database-in-e3\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"In\u00edcio\",\"item\":\"https:\/\/kb.elipse.com.br\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Manipulating an SQL Database in 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\/def69ea453ea60b250497b89225a9f87\",\"name\":\"Elipse Software\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ff1f7ec38f4687b06f6851d97b3cd2d0?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ff1f7ec38f4687b06f6851d97b3cd2d0?s=96&d=mm&r=g\",\"caption\":\"Elipse Software\"},\"url\":\"https:\/\/kb.elipse.com.br\/en\/author\/webmasterelipse-com-br\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Manipulating an SQL Database in 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\/manipulating-an-sql-database-in-e3\/","og_locale":"en_US","og_type":"article","og_title":"[:pt]Manipulating an SQL Database in E3.[:] - Elipse Knowledgebase","og_description":"[:pt]Autor Renato Souza[:]","og_url":"https:\/\/kb.elipse.com.br\/en\/manipulating-an-sql-database-in-e3\/","og_site_name":"Elipse Knowledgebase","article_publisher":"http:\/\/www.facebook.com\/elipsesoftware","article_published_time":"2019-03-25T20:44:00+00:00","article_modified_time":"2019-07-05T18:39:25+00:00","og_image":[{"url":"http:\/\/kb.elipse.com.br\/pt-br\/images\/ID4228\/Fig1.bmp"}],"author":"Elipse Software","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Elipse Software","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kb.elipse.com.br\/en\/manipulating-an-sql-database-in-e3\/#article","isPartOf":{"@id":"https:\/\/kb.elipse.com.br\/en\/manipulating-an-sql-database-in-e3\/"},"author":{"name":"Elipse Software","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/def69ea453ea60b250497b89225a9f87"},"headline":"Manipulating an SQL Database in E3.","datePublished":"2019-03-25T20:44:00+00:00","dateModified":"2019-07-05T18:39:25+00:00","mainEntityOfPage":{"@id":"https:\/\/kb.elipse.com.br\/en\/manipulating-an-sql-database-in-e3\/"},"wordCount":438,"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\/manipulating-an-sql-database-in-e3\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/kb.elipse.com.br\/en\/manipulating-an-sql-database-in-e3\/","url":"https:\/\/kb.elipse.com.br\/en\/manipulating-an-sql-database-in-e3\/","name":"[:pt]Manipulating an SQL Database in E3.[:] - Elipse Knowledgebase","isPartOf":{"@id":"https:\/\/kb.elipse.com.br\/#website"},"datePublished":"2019-03-25T20:44:00+00:00","dateModified":"2019-07-05T18:39:25+00:00","breadcrumb":{"@id":"https:\/\/kb.elipse.com.br\/en\/manipulating-an-sql-database-in-e3\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kb.elipse.com.br\/en\/manipulating-an-sql-database-in-e3\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/kb.elipse.com.br\/en\/manipulating-an-sql-database-in-e3\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"In\u00edcio","item":"https:\/\/kb.elipse.com.br\/en\/"},{"@type":"ListItem","position":2,"name":"Manipulating an SQL Database in 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\/def69ea453ea60b250497b89225a9f87","name":"Elipse Software","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ff1f7ec38f4687b06f6851d97b3cd2d0?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ff1f7ec38f4687b06f6851d97b3cd2d0?s=96&d=mm&r=g","caption":"Elipse Software"},"url":"https:\/\/kb.elipse.com.br\/en\/author\/webmasterelipse-com-br\/"}]}},"_links":{"self":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/3377"}],"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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/comments?post=3377"}],"version-history":[{"count":4,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/3377\/revisions"}],"predecessor-version":[{"id":7551,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/3377\/revisions\/7551"}],"wp:attachment":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/media?parent=3377"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/categories?post=3377"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/tags?post=3377"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}