[Qt-interest] QSQLITE and Network Shares
Sylvain Pointeau
sylvain.pointeau at gmail.com
Wed Nov 11 18:42:24 CET 2009
SQLite needs to put a lock on the file, but the network drives have all a
issue with that.
it is explained on the sqlite website.
I fear that there is no solution to your problem...
Cheers,
Sylvain
On Wed, Nov 11, 2009 at 6:25 PM, Israel Brewster
<israel at frontierflying.com>wrote:
> 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
> -----------------------------------------------
>
>
>
>
>
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091111/db9133c9/attachment.html
More information about the Qt-interest-old
mailing list