.Net MF 4.2 + SqlLite + FEZ EMX Spider

I’m trying to make SQLite works on a FEZ Spider flashed with .Net MF 4.2
But I am getting an exception.
I can read and write text files on the SD Card with no problems.
I made a new .Net gadgeteer 4.2 project, used the Fez EMX Spider board, and an SDCard connected to socket F.

Here is the code I tried to run (taken from the GHI 4.2 API reference)

 try
            {
                // Format the media if it was not.
                VolumeInfo nand = new VolumeInfo("SD");
                if (!nand.IsFormatted)
                {
                    nand.Format("FAT", 0);
                }
                // Create new database file
                Database myDatabase = new Database();
                // Open a new Database in NAND Flash
                myDatabase.Open("\\SD\\myDatabase.dbs");
                //add a table
                myDatabase.ExecuteNonQuery("CREATE Table Temperature (Room TEXT, Time INTEGER, Value DOUBLE)");
}
            catch (Exception e)
            {
                Debug.Print(e.Message);
                Debug.Print(Database.GetLastError());
            }

-The VolumeInfo part works
-The exception happens at myDatabase.ExecuteNonQuery(“CREATE Table Temperature (Room TEXT, Time INTEGER, Value DOUBLE)”);
-Exception:

Exception GHI.Premium.SQLite.SQLiteException - 0x00000000 (1)

Message: Could not execute SQL statement.

GHI.Premium.SQLite.Database::ExecuteNonQuery [IP: 0022]

AMD_EMX_SPIDER_0.Program::Main [IP: 0015]

I think SQLite is supposed to work with EMX right ?

@ PhilM - From your snippet, (it could be in your code elsewhere) I do not see a method called to mount the file system before attempting to execute the SQL statement.

            try
            {
                PersistentStorage ps = new PersistentStorage("SD");
                ps.MountFileSystem();

                // Format the media if it was not.
                ...

                // Create new database file
                Database myDatabase = new Database();
                // Open a new Database in NAND Flash
                myDatabase.Open("\\SD\\myDatabase.dbs");
                //add a table
                myDatabase.ExecuteNonQuery("CREATE Table Temperature (Room TEXT, Time INTEGER, Value DOUBLE)");
            }
            catch (Exception e)
            {
                Debug.Print(e.Message);
                Debug.Print(Database.GetLastError());
            }

Yes I actually removed:


PersistentStorage ps = new PersistentStorage("SD");
ps.MountFileSystem();

Because it was giving me an exception.
What I understand is that the SD card is already mounted from the gagdeteer designer when I linked the SD card module with the X5 connector on the EMX spider board.
Also the SD Card works for reading/writing text files.
Or are you saying I need to mount the SD card in a different way for a SQLite database and is not compatible with the gadgeteer module?

@ PhilM - We were able to reproduce this error on our end, including normal file streams are working to the SD Card. We are looking into the issue.

Thanks for checking!
I will wait on the next sdk version to port our code for 4.2, hopefully a fix for SQLite and onewire will be done by then.

@ PhilM - This issue has been resolved and will be included in the next release of the SDK. Thank you for you cooperation.

Thanks this is awesome!