<div dir="ltr">I tried on a geopackage and found two things : <div><div>- Geopackage also has a field length limit in the attributes table. Maybe it's well known...?</div></div><div>- The style load and save problem doesn't occur on geopackage but only on our MSSQL database so far.</div><div><br></div><div>The style bug happens in the layer properties panel, in load style from the database. Restore default style works. From my python code, I think that the getStyleFromDatabase() has some bug with MSSQL db.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le jeu. 7 oct. 2021 à 17:37, Jésahel Benoist <<a href="mailto:djes1975@gmail.com">djes1975@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello list,<div><br></div><div>I had some strange behaviour when trying to load a layer's default style from my DB in the properties panel, I got the error "Root <qgis> element could not be found".</div><div><br></div><div>I opened the layers_styles table directly with the attributes table and discovered that the record's  styleQML got truncated.<br></div><div><br></div><div>The normal length of this field is 69Kb. Truncated is 32Kb. Impossible to add characters in the table. And modifying style always give a truncated size around 32Kb.</div><div><br></div><div>Strangely, using the style panel to load and save by default works ! </div><div><br></div><div>By exporting the layer_styles table in a kml file, I see that everything is correctly stored in the DB.</div><div><br></div><div>Btw, the python code I was using to load default style from db is also broken...</div><div><br></div><div>So I think there's some bug in one of the default style loading internal functions and that the attributes table maximum editable field length is around 32Kb.</div><div><br></div><div> Am I missing something?</div><div><br></div><div>Regards,</div><div><br></div><div>Jésahel</div></div>
</blockquote></div>