[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyQt] QSqlQuery::value: not positioned on a valid record
From:       "=?ISO-8859-1?B?aU1hdGg=?=" <2281570025 () qq ! com>
Date:       2013-12-28 11:29:27
Message-ID: tencent_718912377F296AF73640C625 () qq ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]

[Attachment #4 (text/plain)]

After setting up a table model like this:
code is here [stackoverflow.com]

the content is displayed properly, but when I edit the data item then press enter \
,this error occurred :


    QSqlQuery::value: not positioned on a valid record





when I close the application and restart it again ,I found the editing I did last \
time is not stored into the database ,anyone can fix my problem here .

Note:I did not use 


    model->removeColumn(0)





here.


[Attachment #5 (text/html)]

<div><p style="margin: 5px 0px 10px; padding: 0px 0px 10px; font-family: 'Open Sans', \
sans-serif; font-size: 13px; word-wrap: break-word; color: rgb(54, 53, 52); \
line-height: 16px;">After setting up a table model like this:<br style="margin: 0px; \
padding: 0px;">code is&nbsp;<a \
href="http://stackoverflow.com/questions/20813955/qsqlqueryvalue-not-positioned-on-a-valid-record" \
style="margin: 0px; padding: 0px; color: rgb(68, 165, 28); text-decoration: \
none;">here</a>&nbsp;<em style="margin: 0px; padding: \
0px;">[stackoverflow.com]</em></p><p style="margin: 5px 0px 10px; padding: 0px 0px \
10px; font-family: 'Open Sans', sans-serif; font-size: 13px; word-wrap: break-word; \
color: rgb(54, 53, 52); line-height: 16px;">the content is displayed properly, but \
when I edit the data item then press enter ,this error occurred :<br style="margin: \
0px; padding: 0px;"></p><div class="cpp-qt geshi" style="margin: 0px; padding: 0px; \
font-family: 'Open Sans', sans-serif; color: rgb(54, 53, 52); font-size: 13px; \
line-height: 16px;"><ol style="margin: 1em 0px; padding: 5px 0px; \
list-style-position: inside; list-style-image: initial; color: rgb(175, 175, \
175);"><li class="li1" style="margin: 0px 0px 0px 32px; padding: 0px 0px 0px 12px; \
font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; \
list-style: decimal; line-height: 14px; background-image: none; border-left-width: \
3px; border-left-style: solid; border-left-color: rgb(108, 226, 108);"><div \
class="de1" style="margin: 0px; padding: 0px; font-family: 'Open Sans', sans-serif \
!important; color: rgb(0, 0, 0);">&nbsp; &nbsp;&nbsp;<a \
href="http://qt-project.org/doc/QSqlQuery.html" style="margin: 0px; padding: 0px; \
color: rgb(68, 165, 28); text-decoration: none;"><span class="kw5" style="margin: \
0px; padding: 0px; font-weight: bold;">QSqlQuery</span></a><span class="sy0" \
style="margin: 0px; padding: 0px; color: rgb(54, 53, 52);">::</span><span class="me2" \
style="margin: 0px; padding: 0px; color: rgb(54, 53, 52);">value</span><span \
class="sy0" style="margin: 0px; padding: 0px; color: rgb(54, 53, \
52);">:</span>&nbsp;not positioned on a valid record</div></li></ol></div><p \
style="margin: 5px 0px 10px; padding: 0px 0px 10px; font-family: 'Open Sans', \
sans-serif; font-size: 13px; word-wrap: break-word; color: rgb(54, 53, 52); \
line-height: 16px;"></p><p style="margin: 5px 0px 10px; padding: 0px 0px 10px; \
font-family: 'Open Sans', sans-serif; font-size: 13px; word-wrap: break-word; color: \
rgb(54, 53, 52); line-height: 16px;">when I close the application and restart it \
again ,I found the editing I did last time is not stored into the database ,anyone \
can fix my problem here .</p><p style="margin: 5px 0px 10px; padding: 0px 0px 10px; \
font-family: 'Open Sans', sans-serif; font-size: 13px; word-wrap: break-word; color: \
rgb(54, 53, 52); line-height: 16px;">Note:I did not use&nbsp;<br style="margin: 0px; \
padding: 0px;"></p><div class="cpp-qt geshi" style="margin: 0px; padding: 0px; \
font-family: 'Open Sans', sans-serif; color: rgb(54, 53, 52); font-size: 13px; \
line-height: 16px;"><ol style="margin: 1em 0px; padding: 5px 0px; \
list-style-position: inside; list-style-image: initial; color: rgb(175, 175, \
175);"><li class="li1" style="margin: 0px 0px 0px 32px; padding: 0px 0px 0px 12px; \
font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; \
list-style: decimal; line-height: 14px; background-image: none; border-left-width: \
3px; border-left-style: solid; border-left-color: rgb(108, 226, 108);"><div \
class="de1" style="margin: 0px; padding: 0px; font-family: 'Open Sans', sans-serif \
!important; color: rgb(0, 0, 0);">&nbsp; &nbsp; model<span class="sy0" style="margin: \
0px; padding: 0px; color: rgb(54, 53, 52);">-&gt;</span><span class="me3" \
style="margin: 0px; padding: 0px; color: rgb(54, 53, 52);">removeColumn</span><span \
class="br0" style="margin: 0px; padding: 0px; color: rgb(54, 53, 52);">(</span><span \
class="nu0" style="margin: 0px; padding: 0px; color: rgb(54, 53, 52);">0</span><span \
class="br0" style="margin: 0px; padding: 0px; color: rgb(54, 53, \
52);">)</span></div></li></ol></div><p style="margin: 5px 0px 10px; padding: 0px 0px \
10px; font-family: 'Open Sans', sans-serif; font-size: 13px; word-wrap: break-word; \
color: rgb(54, 53, 52); line-height: 16px;"></p><p style="margin: 5px 0px 10px; \
padding: 0px 0px 10px; font-family: 'Open Sans', sans-serif; font-size: 13px; \
word-wrap: break-word; color: rgb(54, 53, 52); line-height: 16px;">here.</p></div>



_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic