<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, May 9, 2014 at 4:42 AM, Jeff Hardy <span dir="ltr"><<a href="mailto:jdhardy@gmail.com" target="_blank">jdhardy@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div>On Thu, May 8, 2014 at 5:32 PM, Doug Blank <<a href="mailto:doug.blank@gmail.com" target="_blank">doug.blank@gmail.com</a>> wrote:<br>


> Just getting back to attempting to use sqlite3 on computers other than<br>
> Windows, and it looks like this C# library has other problems on other OSes.<br>
><br>
> The first issue is that it appears that all activity must happen in the same<br>
> thread (connection, cursor, execution). That can mitigated against if that<br>
> is the way that it has to be. (A wrapper could be supplied to run everything<br>
> in a specific thread).<br>
><br>
> The next problem is a show stopper:<br>
><br>
> import sqlite3<br>
> conn = sqlite3.connect("test.db")<br>
> cur = conn.cursor()<br>
> cur.execute("select * from tables;")<br>
><br>
> This works on Windows, but gives a SystemError: LockFileEx on Linux. I<br>
> suspect that the information that Ivan pointed to (below) indicates that<br>
> these patches screwed up sqlite port so that it no longer will work on Linux<br>
> and Mac.<br>
><br>
> Anyone have ideas, on either a fix, or using a different library, different<br>
> version?<br>
<br>
</div>Right now, I don't know if there's much that can be done. The C#<br>
SQLite port it uses is pretty Windows-specific, and I doubt it's worth<br>
the effort to fix it since it's no longer maintained anyway. I've been<br>
pondering replacing the guts of the SQLite module with<br>
<a href="https://github.com/ericsink/SQLitePCL.raw" target="_blank">https://github.com/ericsink/SQLitePCL.raw</a>, which wraps the *actual*<br>
SQLite library instead of the C# port.<br>
<br>
The module implementation shouldn't have to change that much, since<br>
most of the function names should be the same. I don't yet know if<br>
SQLitePCL works on Unix/Mac but it does support Android and iOS so<br>
it's probably going to be a lot easier to fix it than it would be for<br>
C#-SQLite.<br>
<br>
I hadn't planned on this until IronPython 3, but I'd be very happy to<br>
include it in 2.7.5 (or a possible 2.7.6) if someone else does the<br>
work.<br></blockquote><div><br></div><div>Thanks for the information! </div><div><br></div><div>As I am also interested in other .NET/Mono languages (and other DB connections), I wonder if we are going to spend any time on this, if it wouldn't be better to use (and perhaps refine, if needed) the <a href="http://ADO.NET">ADO.NET</a> Sqlite interface:</div>

<div> </div><div><a href="http://www.mono-project.com/SQLite" target="_blank">http://www.mono-project.com/SQLite</a><br></div><div><br></div><div>Perhaps it is better to move away from the sqlite-specific API and towards a standard that would allow people to move between db backends? I suspect Vern may have some information on this point, considering his recent announcement here on adodbapi version 2.6.</div>
<div><br></div><div>-Doug</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<span><font color="#888888"><br>
- Jeff<br>
</font></span></blockquote></div><br></div></div>