<?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 : Querying on array fields</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce Classic : Querying on array fields</description>
  <pubDate>Thu, 23 May 2013 20:48:43 -700</pubDate>
  <lastBuildDate>Mon, 21 Feb 2011 13:08:07 -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=2523</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>Querying on array fields : I don&amp;#039;t think you can query...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2523&amp;PID=10013#10013</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> 2523<br /><strong>Posted:</strong> 21-Feb-2011 at 1:08pm<br /><br />I don't think you can query on the Timestamp column using an RdbQuery, but you can do this with a PassthruRdbQuery.&nbsp; Something like the following:<DIV><SPAN style="COLOR: #2b91af"></SPAN>&nbsp;</DIV><DIV><SPAN style="COLOR: #2b91af">RdbParameter</SPAN>&nbsp;parm&nbsp;=&nbsp;<SPAN style="COLOR: blue">new</SPAN>&nbsp;<SPAN style="COLOR: #2b91af">RdbParameter</SPAN>(<SPAN style="COLOR: #a31515">"ts"</SPAN>,&nbsp;<SPAN style="COLOR: #2b91af">DbType</SPAN>.Binary);<BR>parm.Value&nbsp;=&nbsp;maxLocalRowVersion;</DIV><DIV><SPAN style="COLOR: #2b91af">ParameterizedSql</SPAN>&nbsp;sql&nbsp;=&nbsp;<SPAN style="COLOR: blue">new</SPAN>&nbsp;<SPAN style="COLOR: #2b91af">ParameterizedSql</SPAN>(<SPAN style="COLOR: #a31515">"select&nbsp;*&nbsp;from&nbsp;mytable where&nbsp;lastupdate&nbsp;&gt;&nbsp;?"</SPAN>,&nbsp;parm);<BR><SPAN style="COLOR: #2b91af">PassthruRdbQuery</SPAN>&nbsp;passThruQuery&nbsp;=&nbsp;<SPAN style="COLOR: blue">new</SPAN>&nbsp;<SPAN style="COLOR: #2b91af">PassthruRdbQuery</SPAN>(<SPAN style="COLOR: blue">typeof</SPAN>(<SPAN style="COLOR: #2b91af">MyType</SPAN>),&nbsp;sql);<BR></DIV><DIV>You can use the AdoHelper if you need to use provider-specific parameter and placeholder names.</DIV>]]>
   </description>
   <pubDate>Mon, 21 Feb 2011 13:08:07 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2523&amp;PID=10013#10013</guid>
  </item> 
  <item>
   <title>Querying on array fields : My application is a distributed...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2523&amp;PID=10006#10006</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=627" rel="nofollow">stevenr</a><br /><strong>Subject:</strong> 2523<br /><strong>Posted:</strong> 21-Feb-2011 at 7:56am<br /><br /><P>My application is a distributed system where data entered by multiple users gets saved to a central database and then each user must be able to synchronize with the central database to receive the latest changes.&nbsp; The system&nbsp; uses timestamp columns to track whether records in certain tables have changed. In the synchronization method, I would like to formulate a query to download only those records that have changed on the server, rather than downloading the tables in their entirety. In other words, on a given client, I would like to get the highest timestamp value locally and then query the server for higher timestamp values to receive only the records that have changed since then. The tables do have datetime auditing fields, but I'd rather not rely on querying these because if the clock is not set properly on the client or the server, this would cause problems.<BR>The timestamp columns are added to my model as fields of type byte&#091;&#093;. How do I write a query that uses this byte&#091;&#093; field in the where clause? I've tried the obvious:</P><P>// maxLocalRowVersion contains the maximum local row version<BR>qry.AddClause(MyType.RowVersionEntityColumn, EntityColumnOp.GT, maxLocalRowVersion);</P><P>This statement fails with the error: The 'In' and 'Between' operators can only be used with Collection values (and vice versa)<BR>&nbsp;<BR>I've also tried to set the field type to Int64 in the model, but then I get an exception that the byte&#091;&#093; type cannot be converted to Int64. How do I handle this?</P>]]>
   </description>
   <pubDate>Mon, 21 Feb 2011 07:56:07 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2523&amp;PID=10006#10006</guid>
  </item> 
 </channel>
</rss>