<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — SQL trail: inaccurate error message?]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=2004&amp;type=atom" />
	<updated>2011-04-09T10:36:16Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=2004</id>
		<entry>
			<title type="html"><![CDATA[Re: SQL trail: inaccurate error message?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=8727#p8727" />
			<content type="html"><![CDATA[<p>Hi guys. Thank you both for tracking down the problem. I couldn&#039;t reproduce the bug 709, now I know why. The fix will be included in next (2.3.4) release.</p><p>Janusz</p>]]></content>
			<author>
				<name><![CDATA[itronics]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=89</uri>
			</author>
			<updated>2011-04-09T10:36:16Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=8727#p8727</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: SQL trail: inaccurate error message?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=8719#p8719" />
			<content type="html"><![CDATA[<p><img src="https://frontaccounting.com/punbb/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>But still, we have another discovered issue (SQL trail issue that you found) to be solved.</p>]]></content>
			<author>
				<name><![CDATA[apprayo]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=5314</uri>
			</author>
			<updated>2011-04-09T05:07:16Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=8719#p8719</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: SQL trail: inaccurate error message?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=8717#p8717" />
			<content type="html"><![CDATA[<p>Hi apprayo,</p><p>&nbsp; &nbsp;Great to know that you have solve your issue. This forum is great to share our experience and knowledge with each others. Hope you enjoy it. <img src="https://frontaccounting.com/punbb/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /></p>]]></content>
			<author>
				<name><![CDATA[tclim]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=4821</uri>
			</author>
			<updated>2011-04-09T04:59:16Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=8717#p8717</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: SQL trail: inaccurate error message?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=8714#p8714" />
			<content type="html"><![CDATA[<p>Let me copy my explanation about the issue here:</p><div class="quotebox"><blockquote><p><strong><a href="http://mantis.frontaccounting.com/view.php?id=709">0000709: Cannot view GRN transaction detail</a></strong></p><br /><p>Each time I click the link of GRN transaction number (to view the transaction detail) in Inventory Item Movement report or Supplier Transaction Inquiry, the new window open with error message:<br />======================<br />DATABASE ERROR : FATAL : duplicate purchase order found<br />sql that failed was :<br />======================</p><p>There is no additional information of failed SQL.</p><p>After some search in the PHP code, it seems this is because the content of grn_batch.purch_order_no field doesn&#039;t match with the field purch_orders.order_no.</p><p>The purch_orders.order_no is auto-increment generated, while grn_batch.purch_order_no contains big numbers (I haven&#039;t found where are they taken from).</p><p>I tried another new installation, and I got similar issue.</p></blockquote></div><p>I tested further after I read your post, and found that I got the issue when I turned on the SQL trail. The issue was gone after I turned of the SQL trail.</p><p>Hope this helps.</p>]]></content>
			<author>
				<name><![CDATA[apprayo]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=5314</uri>
			</author>
			<updated>2011-04-09T04:50:12Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=8714#p8714</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: SQL trail: inaccurate error message?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=8713#p8713" />
			<content type="html"><![CDATA[<p>Hi apprayo,</p><p>&nbsp; I was unable to view your issued. Anyway, if you have any good suggestion, kindly let me know.</p><p> Thanks.</p>]]></content>
			<author>
				<name><![CDATA[tclim]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=4821</uri>
			</author>
			<updated>2011-04-09T04:40:28Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=8713#p8713</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: SQL trail: inaccurate error message?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=8712#p8712" />
			<content type="html"><![CDATA[<p>Thanks tclim!<br />I think your explanation related with my other issue here: http://mantis.frontaccounting.com/view.php?id=709.</p>]]></content>
			<author>
				<name><![CDATA[apprayo]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=5314</uri>
			</author>
			<updated>2011-04-09T04:28:22Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=8712#p8712</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: SQL trail: inaccurate error message?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=8711#p8711" />
			<content type="html"><![CDATA[<p>Hi All,</p><p>&nbsp; Beware of using SQL Trail.</p><p>&nbsp; I have some issue when using SQL trail for debugging. I have spend quite some time to understand how it work. And finally, I have turn off this features and everything work fine. </p><p>The scenario was:</p><p>&nbsp; 1) Create a new customer branch<br />&nbsp; 2) Add Branch Contacts and here it hit an error. (The branch id should be pass to the branch contact when you create a new contact information in branch). When you activate the SQL trail. The branch id doesn&#039;t return but it return the wrong id when you execute the sql statement to retrieve the branch id using db_insert_id();</p><p> This db_insert_id(); should return the branch id but rather it return the wrong id from 0_sql_trail -&gt; id.</p><p>For example: Insert branch return 100;<br />When you activate the SQL trail, it execute another sql statement to insert the debugging message in 0_sql_trail. and the sql_trail -&gt; id now = 101.<br />When you execute the db_insert_id(), you expect the returning id is from branch id but instead it return 101.</p><p>When I turn off the SQL trail, and re-create the branch and branch contact. It works fine. The returning branch id is correct.</p><p>Suggestion: Please change these SQL Trail features to store the message in text file rather then in database. it will help a lot and save time for new developer like me who are trying to change FrontAccounting module. If you have any better idea, please share it with me. Thanks you.</p>]]></content>
			<author>
				<name><![CDATA[tclim]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=4821</uri>
			</author>
			<updated>2011-04-09T04:13:11Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=8711#p8711</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: SQL trail: inaccurate error message?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=8710#p8710" />
			<content type="html"><![CDATA[<p>Thanks for the response.</p><p>So, as long as the result is 1, I can ignore the error message?</p>]]></content>
			<author>
				<name><![CDATA[apprayo]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=5314</uri>
			</author>
			<updated>2011-04-09T00:38:31Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=8710#p8710</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: SQL trail: inaccurate error message?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=8706#p8706" />
			<content type="html"><![CDATA[<p>The messages are included in the table just as a comment helpfull in recognizing where the query was issued. If you want to find real problems, just make a query like:<br /></p><div class="codebox"><pre><code>SELECT * FROM 0_sql_trail where result=0</code></pre></div>]]></content>
			<author>
				<name><![CDATA[itronics]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=89</uri>
			</author>
			<updated>2011-04-08T21:38:20Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=8706#p8706</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[SQL trail: inaccurate error message?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=8693#p8693" />
			<content type="html"><![CDATA[<p>Hi all,</p><p>I activated SQL trail option ($sql_trail = 1), and found that some (or maybe all) of error messages are inaccurate.<br />For instance, I added a new customer. The new customer data was successfully saved. But in the sql_trail table I found these rows:</p><p>=================<br />sql | result |msg</p><p>BEGIN | 1 | could not start a transaction</p><p>INSERT INTO debtors_master (name, debtor_ref, address, tax_id, dimension_id, dimension2_id, curr_code, credit_status, payment_terms, discount, pymt_discount,credit_limit, sales_type, notes) VALUES (&#039;Dummy Customer&#039;, &#039;Dummy Customer&#039;, &#039;Jakarta&#039;, &#039;&#039;,&#039;0&#039;, &#039;0&#039;, &#039;IDR&#039;, &#039;1&#039;, &#039;2&#039;, 0, 0, 1000, &#039;1&#039;, &#039;&#039;) | 1 | The customer could not be added</p><p>COMMIT | 1 | could not commit a transaction<br />=================</p><p>I saw that the new customer data existed in debtors_master table.<br />So why did the SQL trail tell me that the query was failed?</p><p>Was it because the debtors_master table is MyISAM?</p><p>Then I tried to do another transaction with InnoDB tables. I added a new item tax type (the item_tax_types table is of InnoDB type). The new data was saved correctly (I think so). But still, I got similar error message in sql_trail table:</p><p>=================<br />BEGIN &nbsp; &nbsp; 1 &nbsp; &nbsp; could not start a transaction<br />INSERT INTO item_tax_types (name, exempt) VALUES (&#039;No tax&#039;,&#039;1&#039;) &nbsp; &nbsp; 1 &nbsp; &nbsp; could not add item tax type<br />COMMIT &nbsp; &nbsp; 1 &nbsp; &nbsp; could not commit a transaction<br />=================</p><p>Is there any body can help me to explain this?<br />Thanks in advance.</p><p>Albert</p>]]></content>
			<author>
				<name><![CDATA[apprayo]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=5314</uri>
			</author>
			<updated>2011-04-07T07:18:29Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=8693#p8693</id>
		</entry>
</feed>
