<div dir="ltr"><div><div>I recently tested version 2.0 and found that I can not add features to a spatialite layer where the primary key is defined by two fields: text and integer. Error message: <br>


        
        
        
        <style type="text/css">P { margin-bottom: 2.12mm; background: none repeat scroll 0% 0% transparent; direction: ltr; color: rgb(0, 0, 0); widows: 2; orphans: 2; page-break-before: auto; }A:link { color: rgb(0, 0, 255); }</style>


<p style="margin-bottom:0mm"><font style="font-size:9pt">"Errors:
ERROR: 1 feature(s) not added.</font></p>
<p style="margin-bottom:0mm"><font style="font-size:9pt">Provider
errors:</font></p>
<p style="margin-bottom:0mm"><font style="font-size:9pt">SQLite
error: t2.col_2 may not be NULL</font></p>
<p style="margin-bottom:0mm"><font style="font-size:9pt">SQL:
INSERT INTO "t2"("col_1","col_2")
VALUES (?,?)"</font></p>

<br></div><br>In addition, in QGIS-master  (version 2.1) there is also a problem to add features to a spatialite layer where the primary key is text (only one field).  <br><br>I have been using 1.9.90 for several months and not had these problems before, at least not after bug #4569 was fixed [1]. A sample project and data base may be downloaded from here [2] for testing, just start editing the layers and try to add some features. Updating layer t2 fails in version 2.0 while there is problems with both layer t1 and t2 in version 2.1. <br>
<br></div><div>Could someone please verify before I send a bug report? (I am using Ubuntu 12.04, qgis built from source with spatialite 4.1.1)</div><div><br></div><div>regards<br></div><div>Josef<br></div><div><br>[1] <a href="http://hub.qgis.org/issues/4569">http://hub.qgis.org/issues/4569</a><br>
[2] <a href="https://docs.google.com/file/d/0B1vhrFUx2OZBckdzeDVkY0h4Tms/edit?usp=sharing">https://docs.google.com/file/d/0B1vhrFUx2OZBckdzeDVkY0h4Tms/edit?usp=sharing</a><br><br></div></div>