[Qt-interest] QSQLITE and Network Shares

Israel Brewster israel at frontierflying.com
Wed Nov 11 18:25:52 CET 2009


If it helps, I am attaching a simple unit test case that illustrates  
the problem, at least on my system. If this doesn't occur for other  
people, I would be interested in knowing that too. The test asks you  
to select a location for a database, and then creates it and attempts  
a simple CREATE TABLE and SELECT. On my machine, if I select a local  
directory, it works. If I select a mounted network share, it fails. As  
stated, I am running Mac OS X 10.5.8 with Qt 4.5.2. The share is an  
AFP share (I also tried with a SMB share, same result). Thanks for any  
help that can be provided!


On Nov 10, 2009, at 2:36 PM, Israel Brewster wrote:

> Running Mac OS X 10.5, Qt 4.5.2. I am having a problem using  
> QSqlDatabase with the SQLITE driver if the database file is located  
> on a network share. The database opens fine, being created if it  
> doesn't exist (QSqlDatabase::open returns true), but as soon as I  
> try to do anything with the database (such as select) I get an error  
> saying "database is locked Unable to execute statement" - this  
> happens even if the database file didn't exist prior to the call to  
> open, which takes place immediately before the attempted SQL  
> execution. If I use the command line version of SQLite on the same  
> file, it works fine. Also, the same file, if moved to a local  
> directory, works - the problem only occurs when the database is on a  
> network share.. What can I do to fix this issue? Thanks.
>
> -----------------------------------------------
> Israel Brewster
> Computer Support Technician II
> Frontier Flying Service Inc.
> 5245 Airport Industrial Rd
> Fairbanks, AK 99709
> (907) 450-7250 x293
> -----------------------------------------------
>
> <Israel Brewster.vcf>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest

-----------------------------------------------
Israel Brewster
Computer Support Technician II
Frontier Flying Service Inc.
5245 Airport Industrial Rd
Fairbanks, AK 99709
(907) 450-7250 x293
-----------------------------------------------



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091111/6cb1cc1a/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Israel Brewster.vcf
Type: text/directory
Size: 417 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091111/6cb1cc1a/attachment.bin 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091111/6cb1cc1a/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testclass.cpp
Type: application/octet-stream
Size: 1423 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091111/6cb1cc1a/attachment.obj 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091111/6cb1cc1a/attachment-0002.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestSQLite.pro
Type: application/octet-stream
Size: 299 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091111/6cb1cc1a/attachment-0001.obj 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091111/6cb1cc1a/attachment-0003.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testclass.h
Type: application/octet-stream
Size: 345 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091111/6cb1cc1a/attachment-0002.obj 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091111/6cb1cc1a/attachment-0004.html 


More information about the Qt-interest-old mailing list