<?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 : Custom DataSourceKeyResolver</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce Classic : Custom DataSourceKeyResolver</description>
  <pubDate>Thu, 11 Jun 2026 09:25:26 -700</pubDate>
  <lastBuildDate>Wed, 13 Feb 2008 18:07:47 -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=684</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>Custom DataSourceKeyResolver : Hi, Brian:  Copy below from...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=684&amp;PID=2568#2568</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=4" rel="nofollow">GregD</a><br /><strong>Subject:</strong> 684<br /><strong>Posted:</strong> 13-Feb-2008 at 6:07pm<br /><br />Hi, Brian:<DIV>&nbsp;</DIV><DIV>Copy below from Ch 4 of the Developer Guide. Did you add a probe assembly in IBConfig so DevForce knows where to look for your <FONT color=#2b91af size=2>IDataSourceKeyResolver <FONT color=#000000>class?&nbsp; Easiest if this is a top-level probe assembly so it will be found regardless of the data source you need to access at a given moment.</FONT></FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>Greg</FONT></DIV><DIV><FONT size=2>IdeaBlade</FONT></DIV><DIV>&nbsp;</DIV><DIV><H4 style="MARGIN-LEFT: 0in"><A name=_Toc174789258></A><A name=_Toc151953768></A><SPAN style="FONT-WEIGHT: normal; FONT-FAMILY: 'Times New Roman'">Custom DataSourceKeyResolver</SPAN></H4><P =Ms&#111;normal>Fortunately, it is easy to write a custom <SPAN =ce><SPAN style="FONT-SIZE: 9pt">DataSourceKeyResolver</SPAN></SPAN> that does exactly what you want it to do.</P><P =DoitBullet style="TEXT-INDENT: -0.25in"><SPAN style="FONT-FAMILY: Wingdings">ð<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN>Pick a project to hold your key resolver, e.g. AppHelper</P><P =DoitBullet style="TEXT-INDENT: -0.25in"><SPAN style="FONT-FAMILY: Wingdings">ð<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN>Add a top-level probe assembly tag to <SPAN =ce><SPAN style="FONT-SIZE: 9pt">Ideablade.ibconfig</SPAN></SPAN> so DevForce can find it.</P><DIV style="BORDER-RIGHT: #666699 1pt solid; PADDING-RIGHT: 4pt; BORDER-TOP: #666699 1pt solid; PADDING-LEFT: 4pt; : #e0e0e0; PADDING-BOTTOM: 4pt; MARGIN-LEFT: 0.25in; BORDER-LEFT: #666699 1pt solid; MARGIN-RIGHT: 0.25in; PADDING-TOP: 4pt; BORDER-BOTTOM: #666699 1pt solid"><P =syntax style=": #e0e0e0; MARGIN: 0in 0in 0pt">&lt;?<SPAN style="COLOR: maro&#111;n">xml</SPAN> <SPAN style="COLOR: red">version</SPAN>="1.0" <SPAN style="COLOR: red">encoding</SPAN>="utf-8"?&gt;</P><P =syntax style=": #e0e0e0; MARGIN: 0in 0in 0pt">&lt;<SPAN style="COLOR: maro&#111;n">ideaBlade</SPAN> <SPAN style="COLOR: red">xmlns:xsi</SPAN>=<a href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</A>…</P><P =syntax style=": #e0e0e0; MARGIN: 0in 0in 0pt"><SPAN style="COLOR: blue">&nbsp; </SPAN><SPAN style="COLOR: blue">&lt;</SPAN>probeAssemblyName<SPAN style="COLOR: blue">&gt;</SPAN>AppHelper<SPAN style="COLOR: blue">&lt;/</SPAN>probeAssemblyName<SPAN style="COLOR: blue">&gt;</SPAN></P><P =syntax style=": #e0e0e0; MARGIN: 0in 0in 0pt">…</P></DIV><P =DoitBullet style="TEXT-INDENT: -0.25in"><SPAN style="FONT-FAMILY: Wingdings">ð<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN>Add the following references to that project:<BR><SPAN =ce><SPAN style="FONT-SIZE: 9pt">IdeaBlade.Persistence<BR>IdeaBlade.Util<BR>IdeaBlade.Rdb </SPAN></SPAN><SPAN =ce><SPAN style="FONT-SIZE: 9pt; COLOR: green">// if creating RdbKeys</SPAN></SPAN><SPAN =ce><SPAN style="FONT-SIZE: 9pt"><BR>IdeaBlade.Persistence.Ws </SPAN></SPAN><SPAN =ce><SPAN style="FONT-SIZE: 9pt; COLOR: green">// if creating WsKeys</SPAN></SPAN><BR><BR></P><P =DoitBullet style="TEXT-INDENT: -0.25in"><SPAN style="FONT-FAMILY: Wingdings">ð<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN>Write a class that implements <SPAN =ce><SPAN style="FONT-SIZE: 9pt">IDataSourceKeyResolver</SPAN></SPAN>.</P><P =DoitBullet style="TEXT-INDENT: -0.25in"><SPAN style="FONT-FAMILY: Wingdings">ð<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN>Decorate the class with the <SPAN =ce><SPAN style="FONT-SIZE: 9pt">SerializableAttribute</SPAN></SPAN> (<SPAN =ce><SPAN style="FONT-SIZE: 9pt">&#091;Serializable&#093; in C#</SPAN></SPAN>,&#8195;<SPAN =ce><SPAN style="FONT-SIZE: 9pt">&lt;Serializable()&gt;_</SPAN></SPAN> in VB).</P><P =DoitBullet style="TEXT-INDENT: -0.25in"><SPAN style="FONT-FAMILY: Wingdings">ð<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN>Implement your version of <SPAN =ce><SPAN style="FONT-SIZE: 9pt">GetKey(KeyName, KeyExtension)</SPAN></SPAN> to handle the keys you want to manage.</P><P =DoitBullet style="TEXT-INDENT: -0.25in"><SPAN style="FONT-FAMILY: Wingdings">ð<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN>Return null (Nothing in VB) if you want the <SPAN =ce><SPAN style="FONT-SIZE: 9pt">DefaultDataSourceKeyResolver</SPAN></SPAN> to determine the key.</P></DIV>]]>
   </description>
   <pubDate>Wed, 13 Feb 2008 18:07:47 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=684&amp;PID=2568#2568</guid>
  </item> 
  <item>
   <title>Custom DataSourceKeyResolver : Hi - I have been using embedded...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=684&amp;PID=2544#2544</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=65" rel="nofollow">brianlj</a><br /><strong>Subject:</strong> 684<br /><strong>Posted:</strong> 12-Feb-2008 at 2:10pm<br /><br />Hi -<DIV>I have been using embedded config information for deployment on IIS, but really need to work out a better solution.</DIV><DIV>&nbsp;</DIV><DIV>I have read what I could find about creating my own DataSourceKeyResolver and the creation of the custom class doesn't seem to be much of a problem.</DIV><DIV>&nbsp;</DIV><DIV>However, I haven't been able to get the default persistence manager to use the custom DataSourceKeyResolver.&nbsp; Can someone help shed some light on how it becomes aware of and uses the custom resolver?&nbsp; The documentation seems a little light there.</DIV><DIV>&nbsp;</DIV><DIV>Thanks so much!</DIV><DIV>Brian</DIV>]]>
   </description>
   <pubDate>Tue, 12 Feb 2008 14:10:55 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=684&amp;PID=2544#2544</guid>
  </item> 
 </channel>
</rss>