<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 10, 2014 at 8:47 AM, Slide <span dir="ltr"><<a href="mailto:slide.o.mix@gmail.com" target="_blank">slide.o.mix@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 dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">All the connect call does is this:</span><div style="font-family:arial,sans-serif;font-size:13px">
<br></div><div style="font-family:arial,sans-serif;font-size:13px">
<pre style="white-space:pre-wrap;font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;margin-top:0px;margin-bottom:0px;color:rgb(51,51,51);line-height:18px"><div style="padding-left:10px"><span style="color:rgb(68,85,136);font-weight:bold">int</span> rc = Sqlite3.sqlite3_open(database, <span style="font-weight:bold">out</span> <span style="font-weight:bold">this</span>.db);</div>
<div style="padding-left:10px"><span style="font-weight:bold">if</span>(rc != Sqlite3.SQLITE_OK)</div>
<div style="padding-left:10px"> <span style="font-weight:bold">throw</span> <span style="color:rgb(153,0,0);font-weight:bold">GetSqliteError</span>(<span style="font-weight:bold">this</span>.db, <span style="font-weight:bold">null</span>);</div>
<div style="padding-left:10px"><br></div><div style="padding-left:10px">Which makes me thing that sqlite3_open is returning an error code. What happens if you do the same in CPython?</div></pre></div></div></blockquote><div>
<br></div><div>No error, creates a file of length 0, and works:</div><div><br></div><div><div>$ python</div><div>Python 2.7.5+ (default, Sep 19 2013, 13:48:49) </div><div>[GCC 4.8.1] on linux2</div><div>Type "help", "copyright", "credits" or "license" for more information.</div>
<div>>>> import sqlite3</div><div>>>> sqlite3.connect("/home/dblank/test.db")</div><div><sqlite3.Connection object at 0x7fc3c21b6118></div><div>>>> </div><div><br></div><div>$ ls -al /home/dblank/test.db<br>
</div><div>-rw-r--r-- 1 dblank dblank 0 Feb 10 09:15 /home/dblank/test.db</div><div><br></div></div><div>-Doug</div><div><br></div><div> </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">
<div class="gmail_extra"><div><div class="h5">
<br><br><div class="gmail_quote">On Fri, Feb 7, 2014 at 6:01 AM, Doug Blank <span dir="ltr"><<a href="mailto:doug.blank@gmail.com" target="_blank">doug.blank@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 dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote"><div>On Fri, Feb 7, 2014 at 7:47 AM, Slide <span dir="ltr"><<a href="mailto:slide.o.mix@gmail.com" target="_blank">slide.o.mix@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 dir="ltr">Do you get a specific error message?</div>
</blockquote>
<div><br></div></div><div>Sorry, yes:</div><div><br></div><div><div>Traceback (most recent call last):</div><div> File "<string>", line 1, in <module></div><div>_sqlite3.OperationalError: unable to open database file</div>
</div><div><br></div><div>Does this work for you? I get this error running latest ipy.exe (Mono 2.10, Ubuntu 13.10) and IronPython in Calico.</div><span><font color="#888888"><div><br></div><div>-Doug</div>
</font></span><div><div><div><br></div><div> </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">
<div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On Fri, Feb 7, 2014 at 5:37 AM, Doug Blank <span dir="ltr"><<a href="mailto:doug.blank@gmail.com" target="_blank">doug.blank@gmail.com</a>></span> wrote:<br>
</div></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"><div><div><div dir="ltr">Just recently discovered the sqlite3 port for IronPython, but having some basic trouble:<div>
<br></div><div>
This works fine:</div><div><br></div><div>import sqlite3</div><div>sqlite3.connect("test.db")</div>
<div><br></div><div>but this doesn't:</div><div><br></div><div><div>import sqlite3</div><div>sqlite3.connect("/home/dblank/test.db")</div></div><div><br></div><div>Any ideas?</div><span><font color="#888888"><div>
<br></div><div>-Doug</div>
<div><br></div></font></span></div>
<br></div></div>_______________________________________________<br>
Ironpython-users mailing list<br>
<a href="mailto:Ironpython-users@python.org" target="_blank">Ironpython-users@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/ironpython-users" target="_blank">https://mail.python.org/mailman/listinfo/ironpython-users</a><br>
<br></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br>Website: <a href="http://earl-of-code.com" target="_blank">http://earl-of-code.com</a>
</font></span></div>
</blockquote></div></div></div><br></div></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class=""><font color="#888888">-- <br>Website: <a href="http://earl-of-code.com" target="_blank">http://earl-of-code.com</a>
</font></span></div>
<br>_______________________________________________<br>
Ironpython-users mailing list<br>
<a href="mailto:Ironpython-users@python.org">Ironpython-users@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/ironpython-users" target="_blank">https://mail.python.org/mailman/listinfo/ironpython-users</a><br>
<br></blockquote></div><br></div></div>