<div dir="ltr">I tried loading my DB in KMM 4.8 and it complained about not having a default value for kmmSecurities.pricePrecision. I found my old entries in kmmtmpsecurities, so I set default to 4 and inserted the values in and was able to load everything fine.<div>I tried loading the DB in KMM5 and noticed that the error is kmmcurrencies not kmmsecurities (as I assumed based on your response), so I looked at the new DB I created and cloned the missing field into the table. Once I did this I was able to load my DB in KMM5.</div><div><br></div><div>I saw that the kmmcurrencies table is modified when upgrading to V11 and V12. So I am guessing that since the manager detects that my DB is V12 it doesn't try to make sure that all the tables required are present as it assumes that they have already been created. I do not know why it was not created when I first moved my .kmy file to the DB. I also noticed that my version of DB structure has an extra column in the kmcurrencies (<b>partsPerUnit</b><span style="white-space:pre"> </span>varchar(24) utf8_bin Null: Yes Defualt: NULL) that is not present in the new DB I created. I left it in place since it defaults to null and it's not hurting anything.</div></div><br><div class="gmail_quote"><div dir="ltr">On Sun, Aug 26, 2018 at 3:08 PM El Cas <<a href="mailto:eaglexboy@gmail.com">eaglexboy@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I tried to create a new DB. I got prompted for base currency and then got the following error.<div><br></div><div><p style="margin:0px;white-space:pre-wrap"><span style="font-family:monospace"><b><span style="color:rgb(0,0,0)">Qt has caught an exception thrown from an event handler. Throwing</span><br>exceptions from an event handler is not supported in Qt.<br>You must not let any exception whatsoever propagate through Qt code.<br>If that is not possible, in Qt 5 you must at least reimplement<br>QCoreApplication::notify() and catch all exceptions there<br></b></span></p><p style="margin:0px;white-space:pre-wrap"><b>Unknown account id 'AStd::Asset' .../kmymoney/mymoney/storage/mymoneystoragemgr.cpp:142</b></p><p style="margin:0px;white-space:pre-wrap"><br></p><p style="margin:0px;white-space:pre-wrap">Checked my DB and I can see it created all the required tables.</p><div><img src="cid:ii_jlbci3y51" alt="image.png" width="562" height="391"><br></div><p style="margin:0px;white-space:pre-wrap"><br></p></div></div><br><div class="gmail_quote"><div dir="ltr">On Sun, Aug 26, 2018 at 2:41 PM El Cas <<a href="mailto:eaglexboy@gmail.com" target="_blank">eaglexboy@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Only have one database (See screenshot below)<div><br><div><div><img src="cid:ii_jlbbdwi70" alt="image.png" width="181" height="206"><br></div></div></div><div><br></div><div>I changed the password to my user for that DB and I got bad username</div><div><br></div><div><p style="margin:0px;white-space:pre-wrap"><b>Error in function int MyMoneyStorageSql::open(const QUrl&, int, bool) : opening database</b></p>
<p style="margin:0px;white-space:pre-wrap"><b>Driver = QMYSQL, Host = 192.168.0.4, User = kmymoney, Database = kmymoney</b></p>
<p style="margin:0px;white-space:pre-wrap"><b>Driver Error: QMYSQL: Unable to connect</b></p>
<p style="margin:0px;white-space:pre-wrap"><b>Database Error No 1045: Access denied for user 'kmymoney'@'<a href="http://MobileThingy.hsd1.co.comcast.net" target="_blank">MobileThingy.hsd1.co.comcast.net</a>' (using password: YES)</b></p>
<p style="margin:0px;white-space:pre-wrap"><b>Text: Access denied for user 'kmymoney'@'XXXXXXXXX' (using password: YES) QMYSQL: Unable to connect</b></p>
<p style="margin:0px;white-space:pre-wrap"><b>Error type 1</b></p>
<p style="margin:0px;white-space:pre-wrap"><b>Executed: </b></p>
<p style="margin:0px;white-space:pre-wrap"><b>Query error No -1: </b></p>
<p style="margin:0px;white-space:pre-wrap"><b>Error type 0</b></p></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Sun, Aug 26, 2018 at 2:08 PM Jack <<a href="mailto:ostroffjh@users.sourceforge.net" target="_blank">ostroffjh@users.sourceforge.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p>Is there any chance you actually have two different databases? I
know it doesn't seem likely, but so is not finding a column you
know is present. Perhaps you can change the password on the
database you see, and then see if you get the same error, or one
about bad password?<br>
</p>
<div class="m_-532929691225751102m_3174546605521101774m_4008360424106315228moz-cite-prefix">On 8/26/18 3:39 PM, El Cas wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">I pulled the latest code and rebuild KMM with Build
Type "<span style="font-family:monospace"><span style="color:rgb(0,0,0)"><b>Debugfull</b>" and I enableld
Debug trace. When I tried to load my DB I still got the same
error and I did not see any extra information in the stdout.
I copied the entire message just in case it helps narrow
down why I may be getting this error and what I can do to
help find the cause and fix for it.</span></span>
<div>
<p style="margin:0px;white-space:pre-wrap"><span style="font-family:monospace">
</span><span style="font-family:monospace"><b><span style="color:rgb(0,0,0)">QXcbConnection: XCB error: 3 (BadWindow), sequence: 2179, resource id: 35920248, major code: 40 (TranslateCoords), minor code: 0</span>
</b></span><b>Error in function QMap<QString, MyMoneySecurity> MyMoneyStorageSql::fetchCurrencies(const QStringList&, bool) const : reading Currencies</b></p>
<p style="margin:0px;white-space:pre-wrap"><b>Driver = QMYSQL, Host = 192.168.x.x, User = kmymoney, Database = kmymoney</b></p>
<p style="margin:0px;white-space:pre-wrap"><b>Driver Error: </b></p>
<p style="margin:0px;white-space:pre-wrap"><b>Database Error No -1: </b></p>
<p style="margin:0px;white-space:pre-wrap"><b>Text: </b></p>
<p style="margin:0px;white-space:pre-wrap"><b>Error type 0</b></p>
<p style="margin:0px;white-space:pre-wrap"><b>Executed: SELECT ISOcode, name, type, typeString, symbol1, symbol2, symbol3, symbolString, smallestCashFraction, smallestAccountFraction, pricePrecision FROM kmmCurrencies ORDER BY ISOcode;</b></p>
<p style="margin:0px;white-space:pre-wrap"><b>Query error No 1054: Unknown column 'pricePrecision' in 'field list' QMYSQL: Unable to execute query</b></p>
<p style="margin:0px;white-space:pre-wrap"><b>Error type 2 ...</b><b>/kmymoney/plugins/sql/mymoneystoragesql.cpp:2491</b></p>
<p style="margin:0px;white-space:pre-wrap"><b>
</b></p>
<p style="margin:0px;white-space:pre-wrap">
</p>
<p style="margin:0px;white-space:pre-wrap">
</p>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Sun, Aug 26, 2018 at 12:31 PM Thomas Baumgart
<<a href="mailto:thb@net-bembel.de" target="_blank">thb@net-bembel.de</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Some update
from my end as well: I added some logic which allows me to
create e.g. a Version 8 set of tables. Once I open it, all
updates are applied and the final state is a Version 12
database. Very strange that it does not work for you.<br>
<br>
Regards<br>
<br>
Thomas<br>
<br>
p.s. at some point I might add that to the repo.<br>
<br>
On Sonntag, 26. August 2018 20:25:03 CEST El Cas wrote:<br>
<br>
> Just an update. I looked at the kmmsecurities and the
table already had<br>
> the pricePrecision column ( pricePrecision smallint(5)
UNSIGNED Null: No<br>
> Default: None ).<br>
> <br>
> I am build KMM again with debug enabled and I will see if
I can get more<br>
> info on my it's saying the column is missing when it is
not.<br>
> <br>
> On Sun, Aug 26, 2018 at 8:27 AM Thomas Baumgart <<a href="mailto:thb@net-bembel.de" target="_blank">thb@net-bembel.de</a>> wrote:<br>
> <br>
> > Hi,<br>
> ><br>
> > I am by far not a DB expert and can't really tell
you what was happening.<br>
> > Since you mention you are at DB version 12, the
missing column<br>
> > pricePrecision was introduced with DB version 11.<br>
> ><br>
> > The MYSQL DDL statement for the securities table is
as follows:<br>
> ><br>
> > CREATE TABLE kmmSecurities (id varchar(32) NOT NULL,
name text NOT NULL,<br>
> > symbol mediumtext, type smallint unsigned NOT NULL,
typeString mediumtext,<br>
> > smallestAccountFraction varchar(24), pricePrecision
smallint unsigned NOT<br>
> > NULL, tradingMarket mediumtext, tradingCurrency
char(3), roundingMethod<br>
> > smallint unsigned NOT NULL DEFAULT 7, PRIMARY KEY
(id)) ENGINE = InnoDB;<br>
> ><br>
> ><br>
> > I am not sure, how you can add a column on the fly.
Make sure to assign a<br>
> > value of 4 for existing entries but don't supply a
default for new values.<br>
> ><br>
> > Tony is right in what he mentioned. I am just not
sure if that part my<br>
> > have been hit and is broken. As I don't use the DB
backend I can't tell.<br>
> > Anyone else has ideas?<br>
> ><br>
> > Regards<br>
> ><br>
> > Thomas<br>
> ><br>
> ><br>
> > On Freitag, 24. August 2018 23:25:03 CEST El Cas
wrote:<br>
> ><br>
> > > I just installed KMM from source (pull from
*master* branch on<br>
> > *8/24/2018 @<br>
> > > 11:06 MDT*) and when I tried to log on to my DB
I am get<br>
> > ><br>
> > ><br>
> > ><br>
> > > *Executed: SELECT ISOcode, name, type,
typeString, symbol1, symbol2,<br>
> > > symbol3, symbolString, smallestCashFraction,
smallestAccountFraction,<br>
> > > pricePrecision FROM kmmCurrencies ORDER BY
ISOcode; Query error No 1054:<br>
> > > Unknown column 'pricePrecision' in 'field list'
QMYSQL: Unable to execute<br>
> > > query*<br>
> > > In a previous email thread, Tony Bloomfield had
mentioned that when KMM<br>
> > > opened a Database the Database Manager should
detect the change in<br>
> > version<br>
> > > and create/delete/alter any table/columns as
required, but as you can see<br>
> > > from the error above it's not doing it. Is
there an update SQL script I<br>
> > can<br>
> > > run to update the schema for my 4.8 DB to work
with 5.0?<br>
> > ><br>
> > > According to the the kmmfileinfo table it says
I am using DB version<br>
> > *12* if<br>
> > > that helps determine what script(s) I need to
run.<br>
> > ><br>
> ><br>
> > --<br>
> ><br>
> > Regards<br>
> ><br>
> > Thomas Baumgart<br>
> ><br>
> > <a href="https://www.signal.org/" rel="noreferrer" target="_blank">https://www.signal.org/</a>
Signal, the better WhatsApp<br>
> >
-------------------------------------------------------------<br>
> > Mankind makes a lot of things wrong, but if you
really want to<br>
> > screw up, you need to use a computer! (Juergen von
der Lippe)<br>
> >
-------------------------------------------------------------<br>
> ><br>
> <br>
<br>
-- <br>
<br>
Regards<br>
<br>
Thomas Baumgart<br>
<br>
<a href="https://www.signal.org/" rel="noreferrer" target="_blank">https://www.signal.org/</a>
Signal, the better WhatsApp<br>
-------------------------------------------------------------<br>
Programming is like sex: One mistake and you have to<br>
support it for the rest of your life. (Michael Sinz)<br>
-------------------------------------------------------------<br>
</blockquote>
</div>
</blockquote>
</div>
</blockquote></div>
</blockquote></div>
</blockquote></div>