<?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>Codejock Developer Community : DataBinding Sample Deficiency Workaround</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : DataBinding Sample Deficiency Workaround]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 14:29:06 +0000</pubDate>
  <lastBuildDate>Sat, 11 Jul 2009 13:35:12 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=14724</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[DataBinding Sample Deficiency Workaround : The CJ databinding implementation...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14724&amp;PID=50875&amp;title=databinding-sample-deficiency-workaround#50875</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 14724<br /><strong>Posted:</strong> 11 July 2009 at 1:35pm<br /><br />The CJ databinding implementation is half-baked (for example, it doesn't support VB6 datasource classes), so I don't recommend using it unless you are setting the datasource property directly to a ADO recordset connected to an MS Access database (another forum member has reported probems using databinding with ADO&lt;MSSQL). Try it with your current data stack and if it doesn't work right away, don't fight with it for too long! Switch to using VirtualMode and your own update handling (more work, but it will save you time and pain in the long run).<br><br>However, if you are using ADO&lt;MSACCESS and you are using the CJ sample for reference, there is a problem that you should be aware of. If you want your in-grid edits to be saved to the underlying database, you will have to modify the sample as follows:<br><br>1) Allow editing in the Form_Load event:<br><br><table width="99%"><tr><td><pre class="BBcode"><br>Me.wndRecords.AllowEdit = True<br></pre></td></tr></table><br><br>2) Open your recordset as a <b>KeySet </b>with <b>BatchOptimistic </b>locking by modifying the beginning of the ShowRecords sub as follows:<br><br><table width="99%"><tr><td><pre class="BBcode"><br>Private Sub ShowRecords(Table As String)<br>&nbsp;&nbsp;' show records<br>&nbsp;&nbsp;If Rs.State = adStateOpen Then Rs.Close<br>&nbsp;&nbsp;<br>&nbsp;&nbsp;Rs.Open "select * from &#091;" &amp; Table &amp; "&#093;", Con, adOpenKeyset, adLockBatchOptimistic, adCmdText<br>&nbsp; ' EVERYTHING UNDER RS.OPEN IN EXISTING SHOW RECORDS SUB REMAINS THE SAME<br></pre></td></tr></table><br><br>3) Replace the ValueChanged event to update the underlying recordset as follows:<br><br><table width="99%"><tr><td><pre class="BBcode"><br>Private Sub wndRecords_ValueChanged(ByVal Row AsXtremeReportControl.IReportRow, ByVal Column AsXtremeReportControl.IReportColumn, ByVal Item AsXtremeReportControl.IReportRecordItem)<br>&nbsp;&nbsp;If Not wndRecords.Navigator.CurrentFocusInHeadersRows Then<br>&nbsp;&nbsp;&nbsp;&nbsp;' body row<br>&nbsp;&nbsp;&nbsp;&nbsp;wndRecords.DataManager.UpdateRecord Item.Record<br>&nbsp;&nbsp;&nbsp;&nbsp;Rs.UpdateBatch<br>&nbsp;&nbsp;End If<br>End Sub<br></pre></td></tr></table><br><br>Re-run the sample and your data modifications should now persist.<br>]]>
   </description>
   <pubDate>Sat, 11 Jul 2009 13:35:12 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14724&amp;PID=50875&amp;title=databinding-sample-deficiency-workaround#50875</guid>
  </item> 
 </channel>
</rss>