I'm using that since January and do not have any unesplicable issue. Can you
put a sample of code and query?

The only issue that I had was trying to put sqlite functions inside database
but it's no possible on iOS because this genertes dynamic code, unsuported
on iOS.

But I use ADO.NET objects SqliteConnection, SqliteDataReader and
SqliteCommand, to ExecuteNonQuery and ExecuteReader and do not had any
problem yet. The database have more that 40 tables, many of them with a few
records and some of then with 1000 records, all dynamically downloaded from
server and tables created on the fly, commanded by server.

Sqlite is a bit simpler and limited than I like but appear to be reliable.
But as Sqlite is limited, SQL Mobile 2005 (Windows Mobile) also is limited
but with same C# code between SQL Mobile 2005 and Sqlite on iOS and Android
things runs OK hereŠ

Karl

From:  Anders Kjærgaard Hansen <[email protected]>
Date:  Thu, 9 Jun 2011 09:46:15 +0200
To:  "[email protected]" <[email protected]>
Subject:  [MonoTouch] Anyone knows a workaround for bug in Sqlite on iPad -
or tell me what I am doing wrong.

Hi,
 
I am developing an iPad application, and is using the Sqlite database for
data storage (Mono.Data.Sqlite)
 
Sometimes my queries fail and the ipad app crashes. No exceptions, it just
crashes. 
 
The stacktrace I get is similar to the one described in this bug report
https://bugzilla.novell.com/show_bug.cgi?id=696025
<https://bugzilla.novell.com/show_bug.cgi?id=696025> .
 
To sum up the important lines of the stacktrace is:
  at (wrapper managed-to-native)
Mono.Data.Sqlite.UnsafeNativeMethods.sqlite3_prepare
(intptr,intptr,int,intptr&,intptr&) <IL 0x0002a, 0xffffffff>
  at Mono.Data.Sqlite.SQLite3.Prepare
(Mono.Data.Sqlite.SqliteConnection,string,Mono.Data.Sqlite.SqliteStatement,u
int,string&) [0x00044] in
      
/Developer/MonoTouch/Source/mono/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite
_2.0/SQLite3.cs:258
  at Mono.Data.Sqlite.SqliteCommand.BuildNextCommand () [0x00019] in
      
/Developer/MonoTouch/Source/mono/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite
_2.0/SQLiteCommand.cs:230
 ...
  at Mono.Data.Sqlite.SqliteCommand.ExecuteNonQuery () [0x00000] in
      
/Developer/MonoTouch/Source/mono/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite
_2.0/SQLiteCommand.cs:568
  at MYAPP.db.DbController.ExecuteNonQuery (Mono.Data.Sqlite.SqliteCommand)
[0x00027] in 
      
/Users/MYUSERNAME/Code/PRODUCT/trunk/IPAD_APP/IPAD_APP/db/DbController.cs:77
3
  at MYAPP.db.DbController.SaveInspectionJobHistory
(PRODUCT.ServiceApi.InspectionJobHistory) [0x00274] in
      
/Users/MYUSERNAME/Code/PRODUCT/trunk/IPAD_APP/IPAD_APP/db/DbController.cs:36
0
 
I have tried to ensure that my app only executes one sql statement at a
time, but the issue still appears. It also seems random if the bug occurs in
ExecuteNonQuery or ExecuteReader statements.
 
Does anyone know why this appears, and more importantly, does anyone have
some hints at what I am doing wrong that can cause this to appear.
 
We are getting close to launching the app, and I am considering changing the
datastore to something else if I don¹t feel confident with the Sqlite
implementation in MonoTouch.
 
Best regards
/Anders
 
 
_______________________________________________ MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to