<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.5730.11" name=GENERATOR></HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt Arial">
<DIV>Hi, all,</DIV>
<DIV> </DIV>
<DIV>I read from the mailing list a few days ago about using mnesia:dirty_update_counter() to generate key. I want to use this feature as well, so I have come up with this little test script:</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>====</DIV>
<DIV> </DIV>
<DIV>-module(db_seq).</DIV>
<DIV> </DIV>
<DIV>-record(counter, {tab, key, value}).</DIV>
<DIV> </DIV>
<DIV>-export([init_mnesia_db/0, get_next_seq/1, test/0, setup/0]).</DIV>
<DIV> </DIV>
<DIV>-define(SERVER, ?MODULE).</DIV>
<DIV> </DIV>
<DIV>get_next_seq(Key) -><BR>  mnesia:dirty_update_counter(counter, Key, 1).</DIV>
<DIV> </DIV>
<DIV>setup() -><BR>    mnesia:create_schema([node()]),<BR>    mnesia:start(),<BR>    mnesia:create_table(counter, [{disc_copies, [node()]},<BR>                                  {type, ordered_set},<BR>                                  {attributes, record_info(fields, counter)}]),<BR>    mnesia:stop().<BR>    </DIV>
<DIV> </DIV>
<DIV>test() -><BR>    mnesia:start(),<BR>    mnesia:wait_for_tables([counter], 20000),<BR>    mnesia:dirty_update_counter(counter, a, 1).</DIV>
<DIV> </DIV>
<DIV>====</DIV>
<DIV> </DIV>
<DIV>I fired up erl with this command line "erl -mnesia dir local". Then I executed db_seq:setup() in order to create the schema and table.</DIV>
<DIV> </DIV>
<DIV>Then I run db_seq:test() in order to obtain an integer value, which failed with this message:</DIV>
<DIV> </DIV>
<DIV>6> db_seq:test().<BR>** exited: {aborted,{combine_error,counter,update_counter}} **<BR></DIV>
<DIV>So, what is a "combine_error"? What is the best way to find out the meaning of these error messages (apart from asking the question in mailing list)? Is reading the source code the only way? (Don't get me wrong, I do not mind reading them, but really would like to learn how you guys decipher this kind of error message normally during development...)</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Cheers, Anthony</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<p><span style="font-family:'Arial';font-size:8pt;">**********************************************************************</span></p>
<p><span style="font-family:'Arial';font-size:8pt;">*****   IMPORTANT INFORMATION    *****</span></p>
<p><span style="font-family:'Arial';font-size:8pt;">This document should be read only by those persons to whom it is </span></p>
<p><span style="font-family:'Arial';font-size:8pt;">addressed and its content is not intended for use by any other </span></p>
<p><span style="font-family:'Arial';font-size:8pt;">persons.  If you have received this message in error, please notify </span></p>
<p><span style="font-family:'Arial';font-size:8pt;">us immediately.  Please also destroy and delete the message from </span></p>
<p><span style="font-family:'Arial';font-size:8pt;">your computer.  Any unauthorised form of reproduction of this message </span></p>
<p><span style="font-family:'Arial';font-size:8pt;">is strictly prohibited.</span></p>
<p><span style="font-family:'Arial';font-size:8pt;"></span></p>
<p><span style="font-family:'Arial';font-size:8pt;"> </span></p>
<p><span style="font-family:'Arial';font-size:8pt;">St.George Bank Limited AFSL 240997, Advance Asset Management Limited </span></p>
<p><span style="font-family:'Arial';font-size:8pt;">AFSL 240902,  St.George Life Limited AFSL 240900, ASGARD Capital Management Limited </span></p>
<p><span style="font-family:'Arial';font-size:8pt;">AFSL 240695 and Securitor Financial Group Limited AFSL 240687 is not liable for </span></p>
<p><span style="font-family:'Arial';font-size:8pt;">the proper and complete transmission of the information contained in </span></p>
<p><span style="font-family:'Arial';font-size:8pt;">this communication, nor for any delay in its receipt.</span></p>
<p><span style="font-family:'Arial';font-size:8pt;">**********************************************************************</span></p>
<p><span style="font-family:'Arial';font-size:8pt;"> </span></p></BODY></HTML>