[PyQt] ODBC error while accessing SQL Server from PyQt application

Pradip Dattani pradip.dattani at ntlworld.com
Fri Oct 7 21:57:49 BST 2016


Thanks Oliver.

No, not in a thread. There are no additional threads created in this application.  

 

From: oliver [mailto:oliver.schoenborn at gmail.com] 
Sent: Friday, October 7, 2016 9:55 PM
To: Pradip Dattani <pradip.dattani at ntlworld.com>; pyqt at riverbankcomputing.com
Subject: Re: [PyQt] ODBC error while accessing SQL Server from PyQt application

 

Is the query executed in GUI thread? 

 

On Fri, Oct 7, 2016, 16:23 Pradip Dattani <pradip.dattani at ntlworld.com <mailto:pradip.dattani at ntlworld.com> > wrote:

We have written our first PyQt (4.6) application. However we have hit a serious road block due to an intermittent database access error.

 

The error we see is:  “[Microsoft][ODBC Driver Manager] Invalid string or buffer length”.

 

The application has a number of Tableviews,  drop down lists, TreeWidget etc. Most of these are populated dynamically by querying the database.

Database queries are made through custom API code that uses SqlAlchemy. We do not use QtSql module.

 

We see this error only when executing a database query from within PyQt application. It’s very random and therefore not a reproducible error. Has anyone seen this before and got any pointers to resolve such issues. We have tried to google. We see many posts but no answers. 

 

Are there any good practices we should observe when querying database from within PyQt application.

 

Thank you in advance. 

Regards,

Pradip

_______________________________________________
PyQt mailing list    PyQt at riverbankcomputing.com <mailto:PyQt at riverbankcomputing.com> 
https://www.riverbankcomputing.com/mailman/listinfo/pyqt

-- 

Oliver

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20161007/c953829a/attachment.html>


More information about the PyQt mailing list