Hi, i've installed pyqt4 + python2.5 in windows, and wrote a small script to test ODBC access to <br>a MySQL table. The script is:<br><br><span style="font-family: courier new,monospace;">from PyQt4 import QtSql<br>import sys<br>
<br>db = QtSql.QSqlDatabase.addDatabase("QODBC")<br>db.setDatabaseName("dnsMySQL")<br>db.setHostName("localhost")<br>db.setUserName("myuser")<br>db.setPassword("mypassw")<br>
<br>if not db.open():<br> txt = db.lastError().text()<br> print unicode(txt)<br> sys.exit()<br><br>qry = QtSql.QSqlQuery()<br>qry.exec_( "select id from mytable where id = 20" )<br><br>if qry.next():<br>
a = qry.value(0).toInt()<br> print a<br><br></span>I run it and executes (it prints the value of a) but then the following error appears:<br><br><span style="font-family: courier new,monospace;">the instruction at "0x00ea2acf" referenced memory at "0x01013f20". The memory could not be "read".<br>
</span><br>What's the problem ? Any idea ?<br><br>Thanks<br><br><br>