Main Site Documentation

How can i use sqlite from sd card


#1

Hi, trying to enable sd card for sqlite usage. Using code is bellow and code throws NotSupportedException. How to solve this problem?


using GHIElectronics.NETMF.IO;
using Microsoft.SPOT.IO;

namespace OMR.MF.SqliteApp
{
    public class Program
    {
        private static PersistentStorage _storage;
        private static VolumeInfo _volumeInfo;

        public static void Main()
        {
            _storage = new PersistentStorage("SD");
            _storage.MountFileSystem();

            _volumeInfo = VolumeInfo.GetVolumes()[0];

            GHIElectronics.NETMF.SQLite.Database db = new GHIElectronics.NETMF.SQLite.Database();
            db.Open("\\SD\\test.dat"); // OR ":memory:" 
            // ...
        }
    }
}

Thanks


#2

ChipworkX only


#3

Are you serious?


#4

SQLite database is supported on ChipworkX only. USBizi chip does not have enough memory resources to support SQLite


#5

Yep


#6

Allright, which database would you recommend?


#7

Maybe record your data directly to a file on the microSD?


#8

What are you trying to do maybe there are alternative solutions?


#9

i need to use simple db, sqlite or another. Is there any db framework usable of fez panda 2?


#10

How reliable is it on an SD card.

I think SQLite supports raw read /write. Does GHI support it.
Is it better than having the data base on a file system like SD card
Because FAT could get corrupted.


#11

@ microt2 - start a separate thread