{"id":28,"date":"2007-06-22T23:59:47","date_gmt":"2007-06-22T23:59:47","guid":{"rendered":"https:\/\/www.wapshere.com\/missmiis\/?page_id=28"},"modified":"2008-01-18T16:25:45","modified_gmt":"2008-01-18T16:25:45","slug":"sub-deletefromqueue","status":"publish","type":"page","link":"https:\/\/www.wapshere.com\/missmiis\/code-snippets\/sub-deletefromqueue","title":{"rendered":"jobRunner.vbs: Sub DeleteFromQueue"},"content":{"rendered":"<p style=\"margin: 0cm 0cm 0pt\" class=\"MsoNormal\"><span lang=\"EN-GB\"><font face=\"Times New Roman\">Delete all rows containing Task, Name and Profile from the Queue table.<\/font><\/span><br \/>\n\u00c2\u00a0<br \/>\n<span lang=\"EN-GB\"><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt\" class=\"Code\"><span lang=\"EN-GB\"><font size=\"1\" face=\"Microsoft Sans Serif\">Sub DeleteFromQueue(Task, Name, Profile)<\/font><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt\" class=\"Code\"><span lang=\"EN-GB\"><font size=\"1\"><font face=\"Microsoft Sans Serif\"><span><\/span><span><\/span>\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 Dim objDB, sqlQuery<\/font><\/font><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt\" class=\"Code\"><span lang=\"EN-GB\"><font size=\"1\"><font face=\"Microsoft Sans Serif\"><span><\/span><span><\/span>\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 Set objDB = CreateObject(&#8220;ADODB.Connection&#8221;)<\/font><\/font><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt\" class=\"Code\"><span lang=\"EN-GB\"><font size=\"1\"><font face=\"Microsoft Sans Serif\"><span><\/span><span><\/span>\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 objDB.Open DB_CONNECT_STRING<\/font><\/font><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt\" class=\"Code\"><span lang=\"EN-GB\"><font size=\"1\"><font face=\"Microsoft Sans Serif\"><span><\/span>\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 If Profile = \u00e2\u20ac\u0153\u00e2\u20ac\u009d Then<\/font><\/font><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt\" class=\"Code\"><span lang=\"EN-GB\"><font size=\"1\"><font face=\"Microsoft Sans Serif\"><span><\/span><span><\/span>\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 sqlQuery = &#8220;delete from &#8221; &amp; DB_TABLE_QUEUE &amp; &#8221; where Task='&#8221; &amp; Task &amp; &#8220;&#8216; and Name='&#8221; &amp; Name &amp; &#8220;&#8216;&#8221;<\/font><\/font><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt\" class=\"Code\"><span lang=\"EN-GB\"><font size=\"1\"><font face=\"Microsoft Sans Serif\"><span><\/span>\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 Else<\/font><\/font><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt\" class=\"Code\"><span lang=\"EN-GB\"><font size=\"1\"><font face=\"Microsoft Sans Serif\"><span><\/span><span><\/span>\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 sqlQuery = &#8220;delete from &#8221; &amp; DB_TABLE_QUEUE &amp; &#8221; where Task='&#8221; &amp; Task &amp; &#8220;&#8216; and Name='&#8221; &amp; Name &amp; &#8220;&#8216; and Profile='&#8221; &amp; Profile &amp; &#8220;&#8216;&#8221;<\/font><\/font><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt\" class=\"Code\"><span lang=\"EN-GB\"><font size=\"1\"><font face=\"Microsoft Sans Serif\"><span><\/span>\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 End If<\/font><\/font><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt\" class=\"Code\"><span lang=\"EN-GB\"><font size=\"1\"><font face=\"Microsoft Sans Serif\"><span><\/span><span><\/span>\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 objDB.Execute sqlQuery<\/font><\/font><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt\" class=\"Code\"><span lang=\"EN-GB\"><font size=\"1\"><font face=\"Microsoft Sans Serif\"><span><\/span><span><\/span>\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 objDB.Close<\/font><\/font><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt\" class=\"Code\"><span lang=\"EN-GB\"><font size=\"1\" face=\"Microsoft Sans Serif\">End Sub<\/font><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Delete all rows containing Task, Name and Profile from the Queue table. \u00c2\u00a0 Sub DeleteFromQueue(Task, Name, Profile) \u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 Dim objDB, sqlQuery \u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 Set objDB = CreateObject(&#8220;ADODB.Connection&#8221;) \u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 objDB.Open DB_CONNECT_STRING \u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 If Profile = \u00e2\u20ac\u0153\u00e2\u20ac\u009d Then \u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 sqlQuery = &#8220;delete from &#8221; &amp; DB_TABLE_QUEUE &amp; &#8221; where Task=&#8217;&#8221; &amp; Task &amp; &#8220;&#8216; and Name=&#8217;&#8221; &amp; Name&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":30,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"jetpack_post_was_ever_published":false,"footnotes":""},"class_list":["post-28","page","type-page","status-publish","hentry"],"jetpack_shortlink":"https:\/\/wp.me\/Pkp1o-s","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/pages\/28","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/comments?post=28"}],"version-history":[{"count":0,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/pages\/28\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/pages\/30"}],"wp:attachment":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/media?parent=28"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}