<?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="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Any fast way to clear a table?</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2009 : Any fast way to clear a table?</description>
  <pubDate>Sat, 11 Apr 2026 09:53:45 -700</pubDate>
  <lastBuildDate>Thu, 19 Mar 2009 18:50:24 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=1147</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Any fast way to clear a table? : Unfortunately, no. Using DevForce,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1147&amp;PID=4128#4128</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 1147<br /><strong>Posted:</strong> 19-Mar-2009 at 6:50pm<br /><br />Unfortunately, no.&nbsp; Using DevForce, you need to first load all those entities into cache, and then either Delete() them or ensure that a cascaded delete affects them.&nbsp; <DIV>&nbsp;</DIV><DIV>If you don't need to treat the data as entities and only need&nbsp;a means of performing bulk operations on the database, you can use the AdoHelper in IdeaBlade.Rdb to drop into ADO.NET.&nbsp; It's a bit of a convoluted path to get there, but it's something like this:</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IDataSourceKey key =&nbsp;myEntityManager.DataSourceResolver.GetDataSourceKey("Default");</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // cast or use appropriate EdmKey constructor</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IdeaBlade.EntityModel.Edm.v4.EdmKey edmKey = dataSourceKey as IdeaBlade.EntityModel.Edm.v4.EdmKey;</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RdbKey rdbKey = edmKey.RdbKey as RdbKey;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AdoHelper helper =&nbsp;rdbKey.AdoHelper;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Can now create DB connection and commands directly.</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var command = helper.CreateDbCommand(..);</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV><BR>&nbsp;</DIV>]]>
   </description>
   <pubDate>Thu, 19 Mar 2009 18:50:24 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1147&amp;PID=4128#4128</guid>
  </item> 
  <item>
   <title>Any fast way to clear a table? : Hi,  I&amp;#039;m basically looking...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1147&amp;PID=4105#4105</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=452" rel="nofollow">ken.nelson</a><br /><strong>Subject:</strong> 1147<br /><strong>Posted:</strong> 18-Mar-2009 at 11:36am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>I'm basically looking for a way to truncate or delete all records from a table.&nbsp; The slow and painful way is to simply iterate over all entities, delete() them, then save changes, but I'm wondering if there's a better way?</DIV><DIV>&nbsp;</DIV><DIV>Thanks,</DIV><DIV>Ken</DIV>]]>
   </description>
   <pubDate>Wed, 18 Mar 2009 11:36:57 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1147&amp;PID=4105#4105</guid>
  </item> 
 </channel>
</rss>