<?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 : Database Muiti user Saving</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : General Discussion : Database Muiti user Saving]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Thu, 14 May 2026 03:27:55 +0000</pubDate>
  <lastBuildDate>Thu, 05 May 2011 05:31:39 +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=18236</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[Database Muiti user Saving :   Thanks again gibra. ]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=18236&amp;PID=64218&amp;title=database-muiti-user-saving#64218</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3545">markmark</a><br /><strong>Subject:</strong> 18236<br /><strong>Posted:</strong> 05 May 2011 at 5:31am<br /><br />Thanks again gibra.<div></div>]]>
   </description>
   <pubDate>Thu, 05 May 2011 05:31:39 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=18236&amp;PID=64218&amp;title=database-muiti-user-saving#64218</guid>
  </item> 
  <item>
   <title><![CDATA[Database Muiti user Saving : Also, about multi-user environment...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=18236&amp;PID=64217&amp;title=database-muiti-user-saving#64217</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4669">gibra</a><br /><strong>Subject:</strong> 18236<br /><strong>Posted:</strong> 05 May 2011 at 4:53am<br /><br /><FONT size=2>Also, about <strong>multi-user</strong> environment <U>I don't use any lock</U> as explained in :</FONT><P><strong><FONT size=2>Using Optimistic Concurrency</FONT></strong></P><DIV><a href="http://msdn.microsoft.com/en-us/library/aa0416cz%28VS.80%29.aspx" target="_blank"><FONT size=2>http://msdn.microsoft.com/en-us/library/aa0416cz(VS.80).aspx</FONT></A></DIV><DIV><FONT size=2></FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>Although this articol is for NET, the concepts for Optimistic Concurrency are valid&nbsp;for any language programming.&nbsp;</FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2><img src="http://forum.codejock.com/smileys/smiley1.gif" height="17" width="17" border="0" alt="Smile" title="Smile" /></FONT><FONT size=1></DIV></FONT>]]>
   </description>
   <pubDate>Thu, 05 May 2011 04:53:09 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=18236&amp;PID=64217&amp;title=database-muiti-user-saving#64217</guid>
  </item> 
  <item>
   <title><![CDATA[Database Muiti user Saving :   Many thanks gibraI will starting...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=18236&amp;PID=64216&amp;title=database-muiti-user-saving#64216</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3545">markmark</a><br /><strong>Subject:</strong> 18236<br /><strong>Posted:</strong> 05 May 2011 at 3:54am<br /><br />Many thanks gibra<div>I will starting work on this next week, and will give it a go</div>]]>
   </description>
   <pubDate>Thu, 05 May 2011 03:54:47 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=18236&amp;PID=64216&amp;title=database-muiti-user-saving#64216</guid>
  </item> 
  <item>
   <title><![CDATA[Database Muiti user Saving :   markmark wrote: When the product...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=18236&amp;PID=64052&amp;title=database-muiti-user-saving#64052</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4669">gibra</a><br /><strong>Subject:</strong> 18236<br /><strong>Posted:</strong> 22 April 2011 at 11:59am<br /><br /><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by markmark" alt="Originally posted by markmark" style="vertical-align: text-bottom;" /> <strong>markmark wrote:</strong><br /><br /><P style="MARGIN: 0cm 0cm 0pt"><FONT size=2 face="Arial, Helvetica, sans-serif">When the product is saved or cancelled it would delete the row.</FONT></P><FONT size=2 face="Arial, Helvetica, sans-serif"></FONT><P style="MARGIN: 0cm 0cm 0pt"><FONT size=2 face="Arial, Helvetica, sans-serif">There may be delay issues here as ADO has a lazy save delay.</FONT></P></td></tr></table> <DIV>&nbsp;</DIV><DIV>To avoid delay, after each INSERT or UPDATE you must force the refresh of cache-data&nbsp;using the </DIV><DIV>Microsoft Jet and Replication Objects 2.6 library (MSJRO.DLL):</DIV><DIV>&nbsp;</DIV><DIV>1) in your VB6 project add a reference to the library</DIV><DIV>2) declare a public object variable into a BAS module</DIV><DIV>&nbsp;&nbsp;&nbsp; <strong>Public Jet As JRO.JetEngine</strong></DIV><DIV>3) Create the istance</DIV><DIV>&nbsp;&nbsp;&nbsp; <strong>Set Jet = New JRO.JetEngine</strong></DIV><DIV>4)&nbsp;after each INSERT or UPDATE call&nbsp;&nbsp; </DIV><DIV>&nbsp;&nbsp;&nbsp; <strong>Jet.RefreshCache &lt;CN&gt;</strong></DIV><DIV>&nbsp;&nbsp;&nbsp; where &lt;CN&gt; is your ADODB.Connection object</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Fri, 22 Apr 2011 11:59:01 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=18236&amp;PID=64052&amp;title=database-muiti-user-saving#64052</guid>
  </item> 
  <item>
   <title><![CDATA[Database Muiti user Saving :   Many Thanks Mgampi for your...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=18236&amp;PID=63971&amp;title=database-muiti-user-saving#63971</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3545">markmark</a><br /><strong>Subject:</strong> 18236<br /><strong>Posted:</strong> 19 April 2011 at 4:00am<br /><br /><p>Many Thanks Mgampi for your reply</p><p>I will give this some thought; we have never used SP, all SQL selects, Updates etc are all in code, and because we had to support access as well as SQL server are limited.</p><p>I guess our data stamp method in use at the moment is similar to what you use, in that it stops a save if some one has previously saved that product.</p><p>But the change I have to implement is to give a user warning that the current record he is about to edit is locked, so that they don't make changes that will never get saved, which is what happens now.</p><div>So your early lock method is where I have to look at more closely</div><p>Thanks again<br>Mark</p>]]>
   </description>
   <pubDate>Tue, 19 Apr 2011 04:00:18 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=18236&amp;PID=63971&amp;title=database-muiti-user-saving#63971</guid>
  </item> 
  <item>
   <title><![CDATA[Database Muiti user Saving :  Hi Markmark;we&amp;#039;re successfully...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=18236&amp;PID=63941&amp;title=database-muiti-user-saving#63941</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=109">mgampi</a><br /><strong>Subject:</strong> 18236<br /><strong>Posted:</strong> 18 April 2011 at 8:05am<br /><br />Hi Markmark;<br><br>we're successfully using this approach on SQL server for several years and have no problem at all:<br><br>Generally spoken, all updates are handled by stored procedures that get all old and new data and then handle the update by first selecting the row to be updated providing ALL old data using SELECT ... WITH(ROWLOCK) option.<br>if the record could be found with the old data the update is done and the transaction is committed which releases the row lock.<br>if the record could not be found the SP rolls back the transaction and then checks whether it can find the row by only using the primary key column(s). If it could be found --&gt; another user has changed the record. If it could not be found --&gt; the record has been deleted by another user.<br>The SP returns errors with return values greater 0 but the SP also returns -1 if the record has been changed by another user or -2 if its been deleted. A return value of 0 means SUCCESS.<br><br>If you need an early lock you have to call SELECT ... WITH(ROWLOCK) as soon as the user tries to start editing.<br><br>I don't know how to implement the same using Access, but all our SQL databases (ORACLE, SQL Server, PostgreSQL, ...) work with this approach. <br>]]>
   </description>
   <pubDate>Mon, 18 Apr 2011 08:05:37 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=18236&amp;PID=63941&amp;title=database-muiti-user-saving#63941</guid>
  </item> 
  <item>
   <title><![CDATA[Database Muiti user Saving :      Hi All  Our application...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=18236&amp;PID=63938&amp;title=database-muiti-user-saving#63938</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3545">markmark</a><br /><strong>Subject:</strong> 18236<br /><strong>Posted:</strong> 18 April 2011 at 7:20am<br /><br /><font size="2" face="Arial, Helvetica, sans-serif"></font><p style="margin: 0cm 0cm 0pt;"><font size="2" face="Arial, Helvetica, sans-serif">Hi All</font></p><font size="2" face="Arial, Helvetica, sans-serif"><div></div></font><font size="2" face="Arial, Helvetica, sans-serif"></font><p style="margin: 0cm 0cm 0pt;"><font size="2" face="Arial, Helvetica, sans-serif">Our application is a multi user database app, using Accessor SQL server database.</font></p><font size="2" face="Arial, Helvetica, sans-serif"></font><p style="margin: 0cm 0cm 0pt;"><font size="2" face="Arial, Helvetica, sans-serif">Currently I handle uses saving the same product data using atime stamp.</font></p><font size="2" face="Arial, Helvetica, sans-serif"></font><p style="margin: 0cm 0cm 0pt;"><font size="2" face="Arial, Helvetica, sans-serif">In that when I load the data to the screen I read a lastSaved date.</font></p><font size="2" face="Arial, Helvetica, sans-serif"></font><p style="margin: 0cm 0cm 0pt;"><font size="2" face="Arial, Helvetica, sans-serif">When the user saves the product, it first looks at theproduct lastsaved date on screen and the lastsaved date in the database and ifthey are the same then it allows the save, If not, then an message is displayedto the user that someone else has saved this product while they were editing andwill have to refresh their data and make the changes again.</font></p><font size="2" face="Arial, Helvetica, sans-serif"></font><p style="margin: 0cm 0cm 0pt;"><font face="Arial, Helvetica, sans-serif"><font size="2">&nbsp;<?: prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></font></font></p><font size="2" face="Arial, Helvetica, sans-serif"></font><p style="margin: 0cm 0cm 0pt;"><font size="2" face="Arial, Helvetica, sans-serif">This has worked very well for the past 4 years.</font></p><font size="2" face="Arial, Helvetica, sans-serif"></font><p style="margin: 0cm 0cm 0pt;"><font face="Arial, Helvetica, sans-serif"><font size="2">&nbsp;<o:p></o:p></font></font></p><font size="2" face="Arial, Helvetica, sans-serif"></font><p style="margin: 0cm 0cm 0pt;"><font size="2" face="Arial, Helvetica, sans-serif">However I now reluctantly have to change this, so that assoon as a user starts to edit a products data, it will lock that product insome way</font></p><font size="2" face="Arial, Helvetica, sans-serif"></font><p style="margin: 0cm 0cm 0pt;"><font face="Arial, Helvetica, sans-serif"><font size="2">&nbsp;<o:p></o:p></font></font></p><font size="2" face="Arial, Helvetica, sans-serif"></font><p style="margin: 0cm 0cm 0pt;"><font size="2" face="Arial, Helvetica, sans-serif">Any user trying to edit the locked product will be notifiedthat the product is being edited and is locked.</font></p><font size="2" face="Arial, Helvetica, sans-serif"></font><p style="margin: 0cm 0cm 0pt;"><font face="Arial, Helvetica, sans-serif"><font size="2">&nbsp;<o:p></o:p></font></font></p><font size="2" face="Arial, Helvetica, sans-serif"></font><p style="margin: 0cm 0cm 0pt;"><font size="2" face="Arial, Helvetica, sans-serif">My first thought was to create a new table calledproduct_locking,<span style="mso-spacerun: yes;">&nbsp; </span>and enter the productID as a row as soon as a user starts editing.</font></p><font size="2" face="Arial, Helvetica, sans-serif"></font><p style="margin: 0cm 0cm 0pt;"><font size="2" face="Arial, Helvetica, sans-serif">When the product is saved or cancelled it would delete therow.</font></p><font size="2" face="Arial, Helvetica, sans-serif"></font><p style="margin: 0cm 0cm 0pt;"><font size="2" face="Arial, Helvetica, sans-serif">There may be delay issues here as ADO has a lazy save delay.</font></p><font size="2" face="Arial, Helvetica, sans-serif"></font><p style="margin: 0cm 0cm 0pt;"><font face="Arial, Helvetica, sans-serif"><font size="2">&nbsp;<o:p></o:p></font></font></p><font size="2" face="Arial, Helvetica, sans-serif"></font><p style="margin: 0cm 0cm 0pt;"><font size="2" face="Arial, Helvetica, sans-serif">I could use a text file with the file name as the productID, saved on a shared folder on the server, and that would be used instead ofthe table.</font></p><font size="2" face="Arial, Helvetica, sans-serif"></font><p style="margin: 0cm 0cm 0pt;">&nbsp;</p><font size="2" face="Arial, Helvetica, sans-serif"></font><p style="margin: 0cm 0cm 0pt;"><font size="2" face="Arial, Helvetica, sans-serif">Has any one used a better method that has been successfulthat they would like to share with me?</font></p><font size="2" face="Arial, Helvetica, sans-serif"></font><p style="margin: 0cm 0cm 0pt;"><font face="Arial, Helvetica, sans-serif"><font size="2">&nbsp;<o:p></o:p></font></font></p><font size="2" face="Arial, Helvetica, sans-serif"></font><p style="margin: 0cm 0cm 0pt;"><font size="2" face="Arial, Helvetica, sans-serif">Many Thanks</font></p><font size="2" face="Arial, Helvetica, sans-serif"></font><p style="margin: 0cm 0cm 0pt;"><font face="Arial, Helvetica, sans-serif"><font size="2">&nbsp;<o:p></o:p></font></font></p><font size="2" face="Arial, Helvetica, sans-serif"></font><p style="margin: 0cm 0cm 0pt;"><font size="2" face="Arial, Helvetica, sans-serif">Mark</font></p><font size="2" face="Arial, Helvetica, sans-serif"></font>]]>
   </description>
   <pubDate>Mon, 18 Apr 2011 07:20:24 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=18236&amp;PID=63938&amp;title=database-muiti-user-saving#63938</guid>
  </item> 
 </channel>
</rss>