This may not be a good solution.... but it's something for you to try<br>----------------------------------<br>Hey there<br>
<br>
Since I have not had much response to my CSharpSqlite query in June, I<br>
went ahead and committed the CSharpSqlite binary as well as my custom<br>
<a href="http://ado.net/" target="_blank">ADO.NET</a> wrapper for
CSharpSqlite. The source for them is<br>
OpenSimLibs/trunk/managed.<br>
<br>
Commit Hash: acd5bbdb71682131be386b7a5ce190<div id=":ur">4622b0ee70<br>
ViewGit: <a href="http://opensimulator.org/viewgit/?a=commit&p=opensim&h=acd5bbdb71682131be386b7a5ce1904622b0ee70" target="_blank">http://opensimulator.org/viewgit/?a=commit&p=opensim&h=acd5bbdb71682131be386b7a5ce1904622b0ee70</a><br>
<br>
For those of you who do not know what CSharpSqlite is, I suggest you<br>
read: <a href="http://code.google.com/p/csharp-sqlite/" target="_blank">http://code.google.com/p/<span class="il">csharp</span>-<span class="il">sqlite</span>/</a><br>
Summary: It's an independent implementation of the <span class="il">SQLite</span>
library<br>
written in C#. There are no native libraries associated with it.<br>
This has the advantage of having it work, out of the box in most<br>
configurations. (32bit/64bit/Win/Linux/Mac/more?).<br>
Benchmarks: <a href="http://code.google.com/p/csharp-sqlite/wiki/Benchmarks" target="_blank">http://code.google.com/p/<span class="il">csharp</span>-<span class="il">sqlite</span>/wiki/Benchmarks</a><br>
<br>
A couple of things that I've learned about it during the process of<br>
getting it to work.<br>
<br>
1. The <span class="il">SQLite</span> database files that CSharpSqlite
makes are not byte per<br>
byte compatible. Mono.Data.<span class="il">Sqlite</span> and other
native <span class="il">SQLite</span> tools can<br>
read databases created with CSharpSqlite but CSharpSqlite asserts on<br>
databases created with Mono.Data.<span class="il">Sqlite</span><br>
<br>
2. When running under CSharpSqlite, OpenSimulator will crash on the<br>
first load. Subsequent attempts to load OpenSimulator and it'll be<br>
fine.<br>
<br>
The <a href="http://ado.net/" target="_blank">ADO.NET</a> wrapper that I
wrote for CSharpSqlite is code compatible<br>
with Mono.Data.<span class="il">Sqlite</span>. That means that either
can be used simply by<br>
changing the using statement at the top of each of the <span class="il">SQLite</span>*.cs<br>
files The same code that works for Mono.Data.<span class="il">Sqlite</span>
will also work on<br>
CSharpSqlite because the inner namespaces are exactly the same.<br>
<br>
To save on code maintenance, I implemented CSharpSqlite as the<br>
compilation conditional CSharpSqlite in the OpenSim.Data.<span class="il">Sqlite</span><br>
project.<br>
<br>
#if CSharpSqlite<br>
using Community.CsharpSqlite.<span class="il">Sqlite</span>;<br>
#else<br>
using Mono.Data.<span class="il">Sqlite</span>;<br>
#endif<br>
<br>
CSharpSqlite is easy to define in Microsoft Visual Studio but it's<br>
slightly tougher for just plain Mono.<br>
<br>
In Visual Studio, you right click the OpenSim.Data.<span class="il">Sqlite</span>
project in<br>
the Solution Explorer. Click Properties from the context menu. Then<br>
go to the Build Tab. You'll see a box labeled 'Condition compilation<br>
symbols' that's empty. Simply enter CSharpSqlite into that box, save<br>
the project and compile.<br>
<br>
Apparently in Mono you use the -d:CSharpSqlite parameter when you<br>
compile OpenSim.Data.<span class="il">Sqlite</span>. MonoDevelop may
make this process<br>
easier but I have no basis to work from.<br>
<br>
Hopefully this helps people deal with issues relating to the use of <span class="il">SQLite</span><br>
<br>
Regards<br>
<font color="#888888"><br>
Teravus<br><br></font></div><br><br><div class="gmail_quote">On Sun, Oct 10, 2010 at 10:15 AM, Aldon Hynes <span dir="ltr"><<a href="mailto:Aldon.Hynes@orient-lodge.com">Aldon.Hynes@orient-lodge.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">> From: Justin Clark-Casey<br>
<div class="im">> On 08/10/10 19:04, Aldon Hynes wrote:<br>
> > Okay, I realize this is probably pushing the envelope a little bit, but<br>
> > I've made a little bit of progress in running OpenSim on a Nokia N900<br>
> > smartphone.<br>
> > The Nokia N900 is a linux based phone. There is limited Mono support on<br>
> > it, so I thought I would see if I could run OpenSim on it.<br>
> > I actually got pretty far, but it seems to be failing when I get to the<br>
> > Loading Region's modules (old style) section.<br>
> > I get an error saying Could not load types fo [MySql.Data ... ]<br>
> > I don't believe that the Mono on the N900 supports MySql. On the other<br>
> > hand, I'm using sqlite3 for my database, so I'm wondering why I'm<br>
> > getting the MySql.Data error and if there is some configuration I can do<br>
> > to get around this.<br>
><br>
> It looks like this is a consequence of our module loading system.<br>
> If you move or remove OpenSim.Data.Tests.dll then<br>
> OpenSim may start correctly without the MySQL library (it does on<br>
> my local master). For some reason, module loading is<br>
> loading OpenSim.Data.Tests.dll and then trying to resolve the<br>
> MySQL libraries that it references further on.<br>
<br>
</div>I removed OpenSim.Data.Tests.dll from the opensim/bin directory. Still<br>
getting the same error.<br>
<br>
I wondered if maybe it was some other Test dll, so I moved all of the files<br>
with *Test* out of the opensim/bin directory, and still got the same error.<br>
<br>
So, is there something else I can do to get around the MySQL problem?<br>
I tried using SQLLiteLegacyStandalone.ini and I seemed to get further, but<br>
it gave me an error about failing to load plugin<br>
OpenSim.Data.IXInventoryData I tried tweaking SQLLiteLegacyStandalone.ini<br>
but without any luck.<br>
<br>
Also, when I am running an OpenSim region, do I need the test files?<br>
Especially if I'm trying to run a pared down version on a mobile device?<br>
<font color="#888888"><br>
Aldon<br>
</font><div class="im"><br>
><br>
> I discovered this by first removing Data.MySQL.dll and then<br>
> working back along the chain of resolution problems it<br>
> complained about.<br>
><br>
> > For more details, check my blog post<br>
> > Building Virtual Worlds on the #N900<br>
> > <a href="http://www.orient-lodge.com/node/4281" target="_blank">http://www.orient-lodge.com/node/4281</a><br>
> > Aldon<br>
<br>
</div><div><div></div><div class="h5">_______________________________________________<br>
Opensim-users mailing list<br>
<a href="mailto:Opensim-users@lists.berlios.de">Opensim-users@lists.berlios.de</a><br>
<a href="https://lists.berlios.de/mailman/listinfo/opensim-users" target="_blank">https://lists.berlios.de/mailman/listinfo/opensim-users</a><br>
</div></div></blockquote></div><br>