<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Web Wiz Support and Community Forums : Batch delete of posts fails (SQL versi&#111;n)</title>
  <link>https://forums.webwiz.net/</link>
  <description><![CDATA[This is an XML content feed of; Web Wiz Support and Community Forums : Web Wiz Forums : Batch delete of posts fails (SQL versi&#111;n)]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 11 Apr 2026 13:24:55 +0000</pubDate>
  <lastBuildDate>Thu, 04 Nov 2004 10:25:48 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.08</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>https://forums.webwiz.net/RSS_post_feed.asp?TID=12424</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Web Wiz Support and Community Forums]]></title>
   <url>https://forums.webwiz.net/forum_images/web_wiz_forums.png</url>
   <link>https://forums.webwiz.net/</link>
  </image>
  <item>
   <title><![CDATA[Batch delete of posts fails (SQL versi&#111;n) : Hi IRON-HQ, It sounds as though...]]></title>
   <link>https://forums.webwiz.net/batch-delete-of-posts-fails-sql-version_topic12424_post68955.html#68955</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="https://forums.webwiz.net/member_profile.asp?PF=18114">Shatz</a><br /><strong>Subject:</strong> 12424<br /><strong>Posted:</strong> 04&nbsp;November&nbsp;2004 at 10:25am<br /><br /><P>Hi IRON-HQ,</P><P>It sounds as though the initial rsCommon recordset contains 0 records.&nbsp; This could be the result of a malformed SQL statement.&nbsp; Not sure if this is beyond the scope of your abilities or not, but I would try the following to debug it.&nbsp; Add only the lines of code indicated&nbsp;between the dashed lines&nbsp;below to the /admin/batch_delete_posts.asp file:</P><P><table width="99%"><tr><td><pre class="BBcode"><BR>'Initalise the strSQL variable with an SQL statement to get the topic from the database<BR>strSQL = "SELECT " &amp; strDbTable &amp; "Topic.Topic_ID, " &amp; strDbTable &amp; "Topic.Poll_ID FROM " &amp; strDbTable &amp; "Topic "<BR>If intForumID = 0 Then<BR>&nbsp;strSQL = strSQL &amp; "WHERE " &amp; strDbTable &amp; "Topic.Last_entry_date &lt; " &amp; strDatabaseDateFunction &amp; " - " &amp; intNoOfDays<BR>Else<BR>&nbsp;strSQL = strSQL &amp; "WHERE (" &amp; strDbTable &amp; "Topic.Last_entry_date &lt; " &amp; strDatabaseDateFunction &amp; " - " &amp; intNoOfDays&nbsp; &amp; ") AND (" &amp; strDbTable &amp; "Topic.Forum_ID=" &amp; intForumID &amp; ")"<BR>End If<BR>If intPriority &lt;&gt; 4 Then strSQL = strSQL &amp; " AND (" &amp; strDbTable &amp; "Topic.Priority=" &amp; intPriority &amp; ")"<BR>strSQL = strSQL &amp; ";"</P><P>--------------------------------------------------<BR>' ADD THESE TWO LINES OF CODE.<BR>' Display the resulting SQL statement.<BR>Response.Write "strSql = " &amp; strSql &amp; "&lt;br&gt;"<BR>' Stop ASP processing.<BR>Response.End<BR>--------------------------------------------------</P><P>'Query the database<BR>rsCommon.Open strSQL, adoCon<BR></pre></td></tr></table></P><P>This will cause the server to write the strSql variable to the screen and stop execution so you can look at the SQL statement that is to be executed.&nbsp; You can then open a view to the SQL table via SQL Enterprise Manager and try to execute the SQL statement via that interface which may provide additional debug information if there is a problem with it.&nbsp; If still no success paste the SQL statement in to a post here so we can have a look at it.&nbsp; Also,&nbsp;visually confirm that&nbsp;the Last_Entry_Date field in the Topic table got created as a date data type.</P><P>When I'm having trouble with SQL execution, I use the above method and then go to either Access or SQL Enterprise Manager and sort the data to visually confirm that there are records that should be getting deleted.&nbsp; If there are, then something's wrong with the SQL statement.</P><P>I'm not a SQL expert but I have found in some instances that if I use the BETWEEN expression instead of the explicit &lt;&gt; operators, I have a greater degree of success in&nbsp;testing date ranges.&nbsp; Here's an <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_ba-bz_7o6m.asp" target="_blank">MSDN Article</a> which talks about the BETWEEN expression.&nbsp; Good Luck.&nbsp; :)</P>]]>
   </description>
   <pubDate>Thu, 04 Nov 2004 10:25:48 +0000</pubDate>
   <guid isPermaLink="true">https://forums.webwiz.net/batch-delete-of-posts-fails-sql-version_topic12424_post68955.html#68955</guid>
  </item> 
  <item>
   <title><![CDATA[Batch delete of posts fails (SQL versi&#111;n) : Whenever I attempt to do a batch...]]></title>
   <link>https://forums.webwiz.net/batch-delete-of-posts-fails-sql-version_topic12424_post68874.html#68874</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="https://forums.webwiz.net/member_profile.asp?PF=18142">IRON-HQ</a><br /><strong>Subject:</strong> 12424<br /><strong>Posted:</strong> 02&nbsp;November&nbsp;2004 at 6:50pm<br /><br />Whenever I attempt to do a batch delete of posts, nothing happens and the result screen says zero posts have been removed.<br><br>I have a lot of posts on my forums, and I tried out numerous setting combinations on the delete post form, with no luck at all.<br><br>I re-downloaded the latest version of the code, used a file-compareutility on batch_delete_posts.asp from what is on my site versus thefresh download, and they were identical.<br><br>Has anyone else experienced this problem or actually had success batch-deleting posts?<br><br>Thanks.<br>]]>
   </description>
   <pubDate>Tue, 02 Nov 2004 18:50:57 +0000</pubDate>
   <guid isPermaLink="true">https://forums.webwiz.net/batch-delete-of-posts-fails-sql-version_topic12424_post68874.html#68874</guid>
  </item> 
 </channel>
</rss>