[Mono-list] Single .dll targeted at multi platform but using sqlite, possible?

KeithBoynton keithboynton at flaredesign.co.uk
Thu Aug 23 23:59:55 UTC 2012


So I had to write a SafeCastToBoolean(Object objectToCast) method with logic
in there is work out the object type in order to cast from an int64 to a
Boolean.

Seems strange to have to do this but there you go, I couldn't find any other
information on the subject. I'm aware that SQLite has limited storage types
but I'm confused as to why when you create a column in a table like this:

MyFlag BOOLEAN NOT NULL

Then a call to reader.GetFieldType() for that column returns "System.Int64".

Anyhow, it's working and I've worked around this issue for now.

So....I've transferred everything to a mono project on the MacOS, the
project builds successfully. It's starting to look promising as when I debug
it and it creates the sqlite DB file however it then gives this error:

database is locked at
Community.CsharpSqlite.SQLiteClient.SqliteCommand.GetNextStatement
(System.String pzStart, System.String& pzTail, Community.CsharpSqlite.Vdbe&
pStmt) [0x00000] in <filename unknown>:0 
  at Community.CsharpSqlite.SQLiteClient.SqliteCommand.ExecuteReader
(CommandBehavior behavior, Boolean want_results, System.Int32&
rows_affected) [0x00000] in <filename unknown>:0 
  at Community.CsharpSqlite.SQLiteClient.SqliteCommand.ExecuteReader
(CommandBehavior behavior) [0x00000] in <filename unknown>:0 
  at Community.CsharpSqlite.SQLiteClient.SqliteCommand.ExecuteReader ()
[0x00000] in <filename unknown>:0 
  at Community.CsharpSqlite.SQLiteClient.SqliteCommand.ExecuteScalar ()
[0x00000] in <filename unknown>:0 
  at SoundHound.DatabaseManager.ExecuteScalar (System.String sql) [0x00000]
in <filename unknown>:0 
  at SoundHound.DataAccessManager.InitialiseDataStore () [0x00000] in
<filename unknown>:0



--
View this message in context: http://mono.1490590.n4.nabble.com/Single-dll-targeted-at-multi-platform-but-using-sqlite-possible-tp4656335p4656374.html
Sent from the Mono - General mailing list archive at Nabble.com.


More information about the Mono-list mailing list