<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — SQL Database Error on Direct Invoice Entry]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=485</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=485&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in SQL Database Error on Direct Invoice Entry.]]></description>
		<lastBuildDate>Mon, 30 Mar 2009 01:15:16 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: SQL Database Error on Direct Invoice Entry]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=2133#p2133</link>
			<description><![CDATA[<p>I am having this problem too. to reproduce the error:</p><p>1. install version 2.0.x (i m using 2.0.4 and 2.0.7 to be exact).<br />2. upgrade to 2.1<br />3. follow the upgrade procedure here: https://frontaccounting.com/wbt/pages/download/update-guide.php<br />4. login to frontaccouting as admin<br />5. click on &quot;Direct Invoice&quot;</p><p>------------------------- Error Message ----------------------------------------------------------<br />DATABASE ERROR : could not get POS definition<br />error code : 1064<br />error message : You have an error in your SQL syntax near &#039;AND pos.pos_location=loc.loc_code AND pos.pos_account=acc.id&#039; at line 1<br />sql that failed was : SELECT pos.*, loc.location_name, acc.bank_account_name, acc.account_code FROM 0_sales_pos as pos,0_locations as loc,0_bank_accounts as acc WHERE pos.id= AND pos.pos_location=loc.loc_code AND pos.pos_account=acc.id<br />------------------------- Error Message ----------------------------------------------------------</p><p>Hope can help. </p><p>TQ</p>]]></description>
			<author><![CDATA[null@example.com (zeroone2020)]]></author>
			<pubDate>Mon, 30 Mar 2009 01:15:16 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=2133#p2133</guid>
		</item>
		<item>
			<title><![CDATA[Re: SQL Database Error on Direct Invoice Entry]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=2130#p2130</link>
			<description><![CDATA[<p>In post 19, item 4, you must also change all other pos to other locations (da)&nbsp; do this before you go and delete locations,</p><p>I think this is were the problem was, but works now... on my local that is,&nbsp; I still get the error no my hosted, same db file, same scripts?</p><p>May there is some server side cache or something, I will try later... ok, maybe some browser cache, but all is good, I think this error is gone for good.</p><p>Alvin <img src="https://frontaccounting.com/punbb/img/smilies/smile.png" width="15" height="15" alt="smile" /> and <img src="https://frontaccounting.com/punbb/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[null@example.com (alvin)]]></author>
			<pubDate>Sun, 29 Mar 2009 19:52:43 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=2130#p2130</guid>
		</item>
		<item>
			<title><![CDATA[Re: SQL Database Error on Direct Invoice Entry]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=2125#p2125</link>
			<description><![CDATA[<p>Well, I&#039;m lost. I have checked procedure from post 19 together with manual setting described in post 21 using sql data file you&#039;ve send me, and all works right now. I can entry Direct Invoices and read all sales orders without errors.</p><p>In post 19 point 3 is obsolete, as voided SO are also in inquiry result and without fixing from_stk_loc are read with errors. So change form post 21 is also necessary.</p><p>Janusz</p>]]></description>
			<author><![CDATA[null@example.com (itronics)]]></author>
			<pubDate>Sun, 29 Mar 2009 09:15:16 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=2125#p2125</guid>
		</item>
		<item>
			<title><![CDATA[Re: SQL Database Error on Direct Invoice Entry]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=2123#p2123</link>
			<description><![CDATA[<p>There are no sales orders in the the system,&nbsp; &nbsp;`0_sales_orders`MySQL returned an empty result set (i.e. zero rows).</p>]]></description>
			<author><![CDATA[null@example.com (alvin)]]></author>
			<pubDate>Sun, 29 Mar 2009 01:18:55 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=2123#p2123</guid>
		</item>
		<item>
			<title><![CDATA[Re: SQL Database Error on Direct Invoice Entry]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=2117#p2117</link>
			<description><![CDATA[<p>Well, in fact broken sales orders still can be not readable. I guess the records are also unusable, as they are simply artifacts of failed Direct Invoice entry. If you want get rid with them - do it in phpmyadmin. If you prefer to keep them for some reason change all empty from_stk_loc to some real location.loc_code value from your database.<br />Janusz</p>]]></description>
			<author><![CDATA[null@example.com (itronics)]]></author>
			<pubDate>Sat, 28 Mar 2009 21:10:53 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=2117#p2117</guid>
		</item>
		<item>
			<title><![CDATA[Re: SQL Database Error on Direct Invoice Entry]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=2112#p2112</link>
			<description><![CDATA[<p>no, that did not do it, still got the error</p>]]></description>
			<author><![CDATA[null@example.com (alvin)]]></author>
			<pubDate>Sat, 28 Mar 2009 16:45:10 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=2112#p2112</guid>
		</item>
		<item>
			<title><![CDATA[Re: SQL Database Error on Direct Invoice Entry]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=2106#p2106</link>
			<description><![CDATA[<p>1. update source to latest main CVS version - Default POS will be visible<br />2. enter all defined users, set right POS and update them<br />3. void broken sales orders<br />4. delete Default location and POS if you don&#039;t want to use them.<br />Janusz</p>]]></description>
			<author><![CDATA[null@example.com (itronics)]]></author>
			<pubDate>Sat, 28 Mar 2009 13:41:00 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=2106#p2106</guid>
		</item>
		<item>
			<title><![CDATA[Re: SQL Database Error on Direct Invoice Entry]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=2097#p2097</link>
			<description><![CDATA[<p>So how can I delete default location and not get this error?</p>]]></description>
			<author><![CDATA[null@example.com (alvin)]]></author>
			<pubDate>Fri, 27 Mar 2009 19:06:32 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=2097#p2097</guid>
		</item>
		<item>
			<title><![CDATA[Re: SQL Database Error on Direct Invoice Entry]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=2079#p2079</link>
			<description><![CDATA[<p>Hello,<br />This ugly upgrade bug has been finally localized and fixed. Main CVS branch updated.</p><p>Thanks Alvin for your kindly help.</p><p>Janusz</p>]]></description>
			<author><![CDATA[null@example.com (itronics)]]></author>
			<pubDate>Thu, 26 Mar 2009 16:03:31 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=2079#p2079</guid>
		</item>
		<item>
			<title><![CDATA[Re: SQL Database Error on Direct Invoice Entry]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=2063#p2063</link>
			<description><![CDATA[<p>You can send my the db files by email, but once again the date of broken records entry in relation to version upgrade date is important</p><p>You have found that the source of error is empty sales_orders.stock_from_loc in some records. Can you find whether those records were added to database BEFORE upgrade, or AFTER? You certainly have db dump made before version upgrade, so it should be easy to find. </p><p>When the empty stock_from_loc were in original database, we should deal with bad data during upgrade. Otherwise we have some bug in new code resulting with incorrect sales_order records.</p><p>Janusz</p>]]></description>
			<author><![CDATA[null@example.com (itronics)]]></author>
			<pubDate>Wed, 25 Mar 2009 08:30:33 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=2063#p2063</guid>
		</item>
		<item>
			<title><![CDATA[Re: SQL Database Error on Direct Invoice Entry]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=2061#p2061</link>
			<description><![CDATA[<p>I am not sure, the file producing the error is a new file. I have a db file that produces the error (new) and one the does not (old), I did a text diff on them </p><p>this is non error diff</p><p>for table `0_chart_master`<br />`tax_code` int(11) NOT NULL default &#039;0&#039;,</p><p>for table `0_company`<br />`custom0_name` varchar(60) NOT NULL default &#039;&#039;,<br />&nbsp; `custom0_value` varchar(100) NOT NULL default &#039;&#039;,</p><p>I tried to get the non error file to produce the error, but could not.&nbsp; I tried to get the error file to not produce the error but could not.</p><p>I tried everything I could, the results are the same using script 2.1 and 2.2</p><p>Maybe I could send you the db files and you could play with them?</p><p>Let me know, thanks</p><p>AM</p>]]></description>
			<author><![CDATA[null@example.com (alvin)]]></author>
			<pubDate>Wed, 25 Mar 2009 03:45:29 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=2061#p2061</guid>
		</item>
		<item>
			<title><![CDATA[Re: SQL Database Error on Direct Invoice Entry]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=2055#p2055</link>
			<description><![CDATA[<p>Were the fatal records with empty from_stk_loc added after upgrade, or before? Anyway it is not good, but we should know this to decide how to deal with this problem.</p><p>Janusz</p>]]></description>
			<author><![CDATA[null@example.com (itronics)]]></author>
			<pubDate>Tue, 24 Mar 2009 21:27:22 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=2055#p2055</guid>
		</item>
		<item>
			<title><![CDATA[Re: SQL Database Error on Direct Invoice Entry]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=2053#p2053</link>
			<description><![CDATA[<p>Janusz, </p><p>The error: (MySQL returned an empty result set (i.e. zero rows)) is coming from statement (AND 0_locations.loc_code = 0_sales_orders.from_stk_loc) in looking at the tables, even thou enters are being made in 0_sales_orders, there are no enters in column (from_stk_loc)</p><p>What you think?</p><p>Alvin</p>]]></description>
			<author><![CDATA[null@example.com (alvin)]]></author>
			<pubDate>Tue, 24 Mar 2009 15:08:34 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=2053#p2053</guid>
		</item>
		<item>
			<title><![CDATA[Re: SQL Database Error on Direct Invoice Entry]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=2010#p2010</link>
			<description><![CDATA[<p>Could you explain me how have you fixed the problem? I still cannot find the source of the trouble nor reproduce it. </p><p>Janusz</p>]]></description>
			<author><![CDATA[null@example.com (itronics)]]></author>
			<pubDate>Thu, 19 Mar 2009 22:03:49 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=2010#p2010</guid>
		</item>
		<item>
			<title><![CDATA[Re: SQL Database Error on Direct Invoice Entry]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=2009#p2009</link>
			<description><![CDATA[<p>The error in the first post. It was a database error. I&#039;ve exported all the important info and recreated the database. I&#039;ve noticed that some of the functions like Cash/Delayed in Direct Invoice didn&#039;t show up until I fixed the DB.</p>]]></description>
			<author><![CDATA[null@example.com (ScorpKing)]]></author>
			<pubDate>Thu, 19 Mar 2009 21:40:42 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=2009#p2009</guid>
		</item>
	</channel>
</rss>
