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

oliver oliver.schoenborn at gmail.com
Fri Oct 7 21:54:52 BST 2016


Is the query executed in GUI thread?

On Fri, Oct 7, 2016, 16:23 Pradip Dattani <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
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt

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


More information about the PyQt mailing list