Languages

Menu
Sites
Language
SQLite c#

Hi! I'm trying to port my wear os app to tizen (due to switching from ticwatch pro to galaxy watch), but i have some problems. I have a db in my shared/res directory in visual studio project, and i'm trying to open it with sqlite (throught methods of System.Data.SQLite), without success, because i obtain a segmentation error when i create sqlite connection to db...is shared/res maybe read only directory, as in android? If yes, how can i solve the problem?

Here is the code:.

MainApps:

protected override void OnStart()
        {
            // Handle when your app starts
            String db_path = "/opt/usr/apps/com.feduss.example.BusFinder.Tizen.Wearable/shared/res/CTM_BUS.sqlite";

            SQLiteDatabase db = new SQLiteDatabase(db_path);
            if (File.Exists(db_path))
            {
                Console.WriteLine("File exists...");
                SQLiteCommand selectBusLines = new SQLiteCommand
                ("SELECT * from Routes");
                DataTable res = db.GetDataTable(selectBusLines);
            }
            else
            {
                Console.WriteLine("File does not exist!");
            }
        }

SQLiteDatabase.cs:

public class SQLiteDatabase
    {
        private readonly string _dbConnection;

        public SQLiteDatabase(string dataSource)
        {
            _dbConnection = string.Format("Data Source={0}", dataSource);
        }

        public DataTable GetDataTable(SQLiteCommand command)
        {
            if (command == null) throw new ArgumentNullException("command");

            using (SQLiteConnection connection = new SQLiteConnection(_dbConnection))
            {
                connection.Open();
                command.Connection = connection;

                using (SQLiteDataReader reader = command.ExecuteReader())
                {
                    DataTable result = new DataTable();
                    result.Load(reader);
                    return result;
                }
            }
        }

        public SQLiteCommand GetCommand(string sql)
        {
            if (string.IsNullOrEmpty(sql))
                throw new ArgumentNullException("sql");

            return new SQLiteCommand
            {
                CommandText = sql,
                CommandType = CommandType.Text
            };
        }

        public int ExecuteNonQuery(SQLiteCommand command)
        {
            if (command == null) throw new ArgumentNullException("command");

            using (SQLiteConnection connection = new SQLiteConnection(_dbConnection))
            {
                connection.Open();
                command.Connection = connection;

                return command.ExecuteNonQuery();
            }
        }
    }

 

View Selected Answer

Responses

18 Replies
Jay Cho

Hello, it is great to hear that you are trying to port your app to Tizen.

1. Putting your db file in `shared/res` seems quite all right. However, you can get the exact path by using an API `Tizen.Applications.Application.Current.DirectoryInfo.SharedResource` which you can use after installing `Tizen.NET` nuget package.

2. Using `sqlite-net-base`package is recommanded for Tizen. (Install `sqlite-net-base` to a shared project and install `SQLitePCLRaw.provider.sqlite3.netstandard11` to the Tizen project.)

    - `System.Data.SQLite` is not fully tested, so you may need to do more work to make it running on the Tizen devices.

3. Here is the sample application using sql: https://github.com/Samsung/Tizen-CSharp-Samples/tree/master/Wearable/VoiceMemo

4. You could check dlog with the tag "DOTNET_LAUNCHER" to see the exeption. ( ex: "shell ~ $ dlogutil DOTNET_LAUNCHER ")

feduss

Hi! Thanks for your reply! Unfortunally, sample code is not working, i always get segmentation fault during the creation of the new SQLiteAsyncConnection(path);

 

string resPath = Tizen.Applications.Application.Current.DirectoryInfo.SharedResource;
string db_name = "CTM_BUS.db";
string dbfile = "/home/owner/apps_rw/com.feduss.example.BusFinder.Tizen.Wearable/shared/res/CTM_BUS.db";
SQLiteAsyncConnection database;
database = new SQLiteAsyncConnection(resPath); //Segmentation fault

 

Moreover, dotnet_launcher log doesn't tell me anything of understandable :(...

 

Here is the log:

04-02 21:47:43.860 : Debug / DOTNET_LAUNCHER ( 3498 : 3505 ) : utils.cc: stdlog(309) > ### Logger thread is created
04-02 21:47:43.860 : Debug / DOTNET_LAUNCHER ( 3498 : 3498 ) : dotnet_launcher.cc: CoreRuntime(211) > Constructor called!!
04-02 21:47:43.860 : Debug / DOTNET_LAUNCHER ( 3498 : 3498 ) : main.cc: main(105) > ##### Run it standalone Mode #########
04-02 21:47:43.860 : Debug / DOTNET_LAUNCHER ( 3498 : 3498 ) : main.cc: main(118) > AUL_APPID : com.feduss.example.BusFinder.Tizen.Wearable
04-02 21:47:43.860 : Debug / DOTNET_LAUNCHER ( 3498 : 3498 ) : dotnet_launcher.cc: initialize(257) > libcoreclr : /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.0/libcoreclr.so
04-02 21:47:44.280 : Debug / DOTNET_LAUNCHER ( 3498 : 3498 ) : dotnet_launcher.cc: initialize(282) > libcoreclr dlopen and dlsym success
04-02 21:47:45.110 : Debug / DOTNET_LAUNCHER ( 3498 : 3498 ) : dotnet_launcher.cc: initializeCoreClr(361) > Initialize core clr success
04-02 21:47:45.480 : Info / DOTNET_LAUNCHER ( 3498 : 3505 ) : monitor dir /opt/usr/home/owner/share/.elementary/config/wearable
04-02 21:47:48.680 : Info / DOTNET_LAUNCHER ( 3498 : 3505 ) : 21:47:48 INFO  [3498] tbm_bufmgr_emulator_init:574 - initialized
04-02 22:21:30.560 : Debug / DOTNET_LAUNCHER ( 3664 : 3670 ) : utils.cc: stdlog(309) > ### Logger thread is created
04-02 22:21:30.560 : Debug / DOTNET_LAUNCHER ( 3664 : 3664 ) : dotnet_launcher.cc: CoreRuntime(211) > Constructor called!!
04-02 22:21:30.560 : Debug / DOTNET_LAUNCHER ( 3664 : 3664 ) : main.cc: main(105) > ##### Run it standalone Mode #########
04-02 22:21:30.560 : Debug / DOTNET_LAUNCHER ( 3664 : 3664 ) : main.cc: main(118) > AUL_APPID : com.feduss.example.BusFinder.Tizen.Wearable
04-02 22:21:30.560 : Debug / DOTNET_LAUNCHER ( 3664 : 3664 ) : dotnet_launcher.cc: initialize(257) > libcoreclr : /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.0/libcoreclr.so
04-02 22:21:31.080 : Debug / DOTNET_LAUNCHER ( 3664 : 3664 ) : dotnet_launcher.cc: initialize(282) > libcoreclr dlopen and dlsym success
04-02 22:21:31.840 : Debug / DOTNET_LAUNCHER ( 3664 : 3664 ) : dotnet_launcher.cc: initializeCoreClr(361) > Initialize core clr success
04-02 22:21:32.280 : Info / DOTNET_LAUNCHER ( 3664 : 3670 ) : monitor dir /opt/usr/home/owner/share/.elementary/config/wearable
04-02 22:21:35.800 : Info / DOTNET_LAUNCHER ( 3664 : 3670 ) : 22:21:35 INFO  [3664] tbm_bufmgr_emulator_init:574 - initialized
04-02 22:22:34.540 : Debug / DOTNET_LAUNCHER ( 3814 : 3814 ) : dotnet_launcher.cc: CoreRuntime(211) > Constructor called!!
04-02 22:22:34.540 : Debug / DOTNET_LAUNCHER ( 3814 : 3814 ) : main.cc: main(105) > ##### Run it standalone Mode #########
04-02 22:22:34.540 : Debug / DOTNET_LAUNCHER ( 3814 : 3814 ) : main.cc: main(118) > AUL_APPID : com.feduss.example.BusFinder.Tizen.Wearable
04-02 22:22:34.540 : Debug / DOTNET_LAUNCHER ( 3814 : 3814 ) : dotnet_launcher.cc: initialize(257) > libcoreclr : /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.0/libcoreclr.so
04-02 22:22:34.540 : Debug / DOTNET_LAUNCHER ( 3814 : 3819 ) : utils.cc: stdlog(309) > ### Logger thread is created
04-02 22:22:34.770 : Debug / DOTNET_LAUNCHER ( 3814 : 3814 ) : dotnet_launcher.cc: initialize(282) > libcoreclr dlopen and dlsym success
04-02 22:22:35.880 : Debug / DOTNET_LAUNCHER ( 3814 : 3814 ) : dotnet_launcher.cc: initializeCoreClr(361) > Initialize core clr success
04-02 22:22:36.350 : Info / DOTNET_LAUNCHER ( 3814 : 3819 ) : monitor dir /opt/usr/home/owner/share/.elementary/config/wearable
04-02 22:22:39.840 : Info / DOTNET_LAUNCHER ( 3814 : 3819 ) : 22:22:39 INFO  [3814] tbm_bufmgr_emulator_init:574 - initialized
04-02 22:24:23.170 : Debug / DOTNET_LAUNCHER ( 3877 : 3881 ) : utils.cc: stdlog(309) > ### Logger thread is created
04-02 22:24:23.170 : Debug / DOTNET_LAUNCHER ( 3877 : 3877 ) : dotnet_launcher.cc: CoreRuntime(211) > Constructor called!!
04-02 22:24:23.170 : Debug / DOTNET_LAUNCHER ( 3877 : 3877 ) : main.cc: main(105) > ##### Run it standalone Mode #########
04-02 22:24:23.170 : Debug / DOTNET_LAUNCHER ( 3877 : 3877 ) : main.cc: main(118) > AUL_APPID : com.feduss.example.BusFinder.Tizen.Wearable
04-02 22:24:23.170 : Debug / DOTNET_LAUNCHER ( 3877 : 3877 ) : dotnet_launcher.cc: initialize(257) > libcoreclr : /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.0/libcoreclr.so
04-02 22:24:23.570 : Debug / DOTNET_LAUNCHER ( 3877 : 3877 ) : dotnet_launcher.cc: initialize(282) > libcoreclr dlopen and dlsym success
04-02 22:24:24.900 : Debug / DOTNET_LAUNCHER ( 3877 : 3877 ) : dotnet_launcher.cc: initializeCoreClr(361) > Initialize core clr success
04-02 22:24:25.330 : Info / DOTNET_LAUNCHER ( 3877 : 3881 ) : monitor dir /opt/usr/home/owner/share/.elementary/config/wearable
04-02 22:24:29.300 : Info / DOTNET_LAUNCHER ( 3877 : 3881 ) : 22:24:29 INFO  [3877] tbm_bufmgr_emulator_init:574 - initialized
04-02 22:26:22.990 : Debug / DOTNET_LAUNCHER ( 4029 : 4029 ) : dotnet_launcher.cc: CoreRuntime(211) > Constructor called!!
04-02 22:26:22.990 : Debug / DOTNET_LAUNCHER ( 4029 : 4029 ) : main.cc: main(105) > ##### Run it standalone Mode #########
04-02 22:26:22.990 : Debug / DOTNET_LAUNCHER ( 4029 : 4034 ) : utils.cc: stdlog(309) > ### Logger thread is created
04-02 22:26:22.990 : Debug / DOTNET_LAUNCHER ( 4029 : 4029 ) : main.cc: main(118) > AUL_APPID : com.feduss.example.BusFinder.Tizen.Wearable
04-02 22:26:22.990 : Debug / DOTNET_LAUNCHER ( 4029 : 4029 ) : dotnet_launcher.cc: initialize(257) > libcoreclr : /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.0/libcoreclr.so
04-02 22:26:23.420 : Debug / DOTNET_LAUNCHER ( 4029 : 4029 ) : dotnet_launcher.cc: initialize(282) > libcoreclr dlopen and dlsym success
04-02 22:26:24.420 : Debug / DOTNET_LAUNCHER ( 4029 : 4029 ) : dotnet_launcher.cc: initializeCoreClr(361) > Initialize core clr success
04-02 22:26:24.780 : Info / DOTNET_LAUNCHER ( 4029 : 4034 ) : monitor dir /opt/usr/home/owner/share/.elementary/config/wearable
04-02 22:26:28.010 : Info / DOTNET_LAUNCHER ( 4029 : 4034 ) : 22:26:28
04-02 22:26:28.010 : Info / DOTNET_LAUNCHER ( 4029 : 4034 ) :  INFO  [4029] tbm_bufmgr_emulator_init:574 - initialized
04-02 22:30:03.700 : Debug / DOTNET_LAUNCHER ( 4185 : 4185 ) : dotnet_launcher.cc: CoreRuntime(211) > Constructor called!!
04-02 22:30:03.700 : Debug / DOTNET_LAUNCHER ( 4185 : 4185 ) : main.cc: main(105) > ##### Run it standalone Mode #########
04-02 22:30:03.700 : Debug / DOTNET_LAUNCHER ( 4185 : 4185 ) : main.cc: main(118) > AUL_APPID : com.feduss.example.BusFinder.Tizen.Wearable
04-02 22:30:03.700 : Debug / DOTNET_LAUNCHER ( 4185 : 4185 ) : dotnet_launcher.cc: initialize(257) > libcoreclr : /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.0/libcoreclr.so
04-02 22:30:03.780 : Debug / DOTNET_LAUNCHER ( 4185 : 4191 ) : utils.cc: stdlog(309) > ### Logger thread is created
04-02 22:30:04.070 : Debug / DOTNET_LAUNCHER ( 4185 : 4185 ) : dotnet_launcher.cc: initialize(282) > libcoreclr dlopen and dlsym success
04-02 22:30:05.070 : Debug / DOTNET_LAUNCHER ( 4185 : 4185 ) : dotnet_launcher.cc: initializeCoreClr(361) > Initialize core clr success
04-02 22:30:05.510 : Info / DOTNET_LAUNCHER ( 4185 : 4191 ) : monitor dir /opt/usr/home/owner/share/.elementary/config/wearable
04-02 22:30:09.170 : Info / DOTNET_LAUNCHER ( 4185 : 4191 ) : 22:30:09 INFO  [4185] tbm_bufmgr_emulator_init:574 - initialized
04-02 22:30:50.490 : Debug / DOTNET_LAUNCHER ( 4331 : 4336 ) : utils.cc: stdlog(309) > ### Logger thread is created
04-02 22:30:50.490 : Debug / DOTNET_LAUNCHER ( 4331 : 4331 ) : dotnet_launcher.cc: CoreRuntime(211) > Constructor called!!
04-02 22:30:50.490 : Debug / DOTNET_LAUNCHER ( 4331 : 4331 ) : main.cc: main(105) > ##### Run it standalone Mode #########
04-02 22:30:50.490 : Debug / DOTNET_LAUNCHER ( 4331 : 4331 ) : main.cc: main(118) > AUL_APPID : com.feduss.example.BusFinder.Tizen.Wearable
04-02 22:30:50.490 : Debug / DOTNET_LAUNCHER ( 4331 : 4331 ) : dotnet_launcher.cc: initialize(257) > libcoreclr : /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.0/libcoreclr.so
04-02 22:30:51.110 : Debug / DOTNET_LAUNCHER ( 4331 : 4331 ) : dotnet_launcher.cc: initialize(282) > libcoreclr dlopen and dlsym success
04-02 22:30:52.810 : Debug / DOTNET_LAUNCHER ( 4331 : 4331 ) : dotnet_launcher.cc: initializeCoreClr(361) > Initialize core clr success
04-02 22:30:53.460 : Info / DOTNET_LAUNCHER ( 4331 : 4336 ) : monitor dir /opt/usr/home/owner/share/.elementary/config/wearable
04-02 22:30:58.470 : Info / DOTNET_LAUNCHER ( 4331 : 4336 ) : 22:30:58 INFO  [4331] tbm_bufmgr_emulator_init:574 - initialized
04-02 22:50:16.550 : Debug / DOTNET_LAUNCHER ( 2883 : 2895 ) : utils.cc: stdlog(309) > ### Logger thread is created
04-02 22:50:16.550 : Debug / DOTNET_LAUNCHER ( 2883 : 2883 ) : dotnet_launcher.cc: CoreRuntime(211) > Constructor called!!
04-02 22:50:16.550 : Debug / DOTNET_LAUNCHER ( 2883 : 2883 ) : main.cc: main(105) > ##### Run it standalone Mode #########
04-02 22:50:16.550 : Debug / DOTNET_LAUNCHER ( 2883 : 2883 ) : main.cc: main(118) > AUL_APPID : com.feduss.example.BusFinder.Tizen.Wearable
04-02 22:50:16.550 : Debug / DOTNET_LAUNCHER ( 2883 : 2883 ) : dotnet_launcher.cc: initialize(257) > libcoreclr : /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.0/libcoreclr.so
04-02 22:50:17.090 : Debug / DOTNET_LAUNCHER ( 2883 : 2883 ) : dotnet_launcher.cc: initialize(282) > libcoreclr dlopen and dlsym success
04-02 22:50:17.640 : Debug / DOTNET_LAUNCHER ( 2883 : 2883 ) : dotnet_launcher.cc: initializeCoreClr(361) > Initialize core clr success
04-02 22:50:18.010 : Info / DOTNET_LAUNCHER ( 2883 : 2895 ) : monitor dir /opt/usr/home/owner/share/.elementary/config/wearable
04-02 22:50:20.690 : Info / DOTNET_LAUNCHER ( 2883 : 2895 ) : 22:50:20 INFO  [2883] tbm_bufmgr_emulator_init:574 - initialized
04-02 22:55:20.550 : Debug / DOTNET_LAUNCHER ( 2886 : 2886 ) : dotnet_launcher.cc: CoreRuntime(211) > Constructor called!!
04-02 22:55:20.550 : Debug / DOTNET_LAUNCHER ( 2886 : 2886 ) : main.cc: main(105) > ##### Run it standalone Mode #########
04-02 22:55:20.550 : Debug / DOTNET_LAUNCHER ( 2886 : 2886 ) : main.cc: main(118) > AUL_APPID : com.feduss.example.BusFinder.Tizen.Wearable
04-02 22:55:20.550 : Debug / DOTNET_LAUNCHER ( 2886 : 2886 ) : dotnet_launcher.cc: initialize(257) > libcoreclr : /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.0/libcoreclr.so
04-02 22:55:20.550 : Debug / DOTNET_LAUNCHER ( 2886 : 2899 ) : utils.cc: stdlog(309) > ### Logger thread is created
04-02 22:55:20.970 : Debug / DOTNET_LAUNCHER ( 2886 : 2886 ) : dotnet_launcher.cc: initialize(282) > libcoreclr dlopen and dlsym success
04-02 22:55:21.640 : Debug / DOTNET_LAUNCHER ( 2886 : 2886 ) : dotnet_launcher.cc: initializeCoreClr(361) > Initialize core clr success
04-02 22:55:22.100 : Info / DOTNET_LAUNCHER ( 2886 : 2899 ) : monitor dir /opt/usr/home/owner/share/.elementary/config/wearable
04-02 22:55:25.240 : Info / DOTNET_LAUNCHER ( 2886 : 2899 ) : 22:55:25 INFO  [2886] tbm_bufmgr_emulator_init:574 - initialized

 

Sangwook Kim

'shared/res' is a read-only directory for resource files. The detailed information about the directory can be found here. You can instead use the app's data directory (Tizen.Applications.Application.Current.DirectoryInfo.Data) or the device internal storage (Tizen.System.DirectoryType.Documents) to store the database file.

 

Also could you let me know where you could see the segmentation fault (any specific error logs?)

 

Jay Cho

Thanks @Sangwook Kim for the correction.

@feduss, please try again as Sangwook said. Maybe you want to use `Application.Current.DirectoryInfo.Data` combining your db file name.

feduss

Hi!

If i copy the db from Tizen.Applications.Application.Current.DirectoryInfo.SharedResource + db_name to Tizen.Applications.Application.Current.DirectoryInfo.Data throught File.Copy, the app gives me segmentation error in SQLiteConnection

String db_name = "CTM_BUS.db"; //db name

//Copy db from shared/res to shared/data
File.Copy(
    Tizen.Applications.Application.Current.DirectoryInfo.SharedResource + db_name,
    Tizen.Applications.Application.Current.DirectoryInfo.Data + db_name);

//Segmentation error here, without details
SQLiteAsyncConnection database = new SQLiteAsyncConnection(Tizen.Applications.Application.Current.DirectoryInfo.Data + db_name);

Tizen.Applications.Application.Current.DirectoryInfo.SharedResource is not the correct path to the app shared/res.

Btw, i tried to copy the db from app's shared/res + db_name to  Tizen.Applications.Application.Current.DirectoryInfo.Data throught File.Copy, but it gives me Segmentation fault (maybe data dir doesn't exist, even if if put the http://tizen.org/privilege/appdir.shareddata permession)

String db_name = "CTM_BUS.db"; //db name

//Tizen.Applications.Application.Current.DirectoryInfo.SharedResource is not the correct path to shared/res of app!

//Copy db from shared/res to shared/data
//It gives me segmentation error
File.Copy(
    "/home/owner/app_rw/com.feduss.example.BusFinder.Tizen.Wearable/shared/res/" + db_name,
    Tizen.Applications.Application.Current.DirectoryInfo.Data + db_name);

//Connection to db
SQLiteAsyncConnection database = new SQLiteAsyncConnection(Tizen.Applications.Application.Current.DirectoryInfo.Data + db_name);

My db is under:

/home/owner/app_rw/com.feduss.example.BusFinder.Tizen.Wearable/shared/res/

 

Mark as answer
Jay Cho

Hi, let me share the simple code you can check.

I installed `sqlite-net-base` and `SQLitePCLRaw.provider.sqlite3.netstandard11` like I explained at the very first comment.

Add using statements

```c#

using SQLite;
using SQLitePCL;

```

and I could find the db file created on the proper path with the following code.

```c#

try
{
    string db_path = Path.Combine(Tizen.Applications.Application.Current.DirectoryInfo.Data, db_name);
    Console.WriteLine("Path " + db_path);

    // To me, it prints "Path: /opt/usr/home/owner/apps_rw/org.tizen.example.CrossTemplate4.Tizen.Wearable/data/CTM_BUS.db"
    raw.SetProvider(new SQLite3Provider_sqlite3());
    raw.FreezeProvider(true);
    SQLiteAsyncConnection database = new SQLiteAsyncConnection(db_path);
}
catch (Exception e)
{
    Console.WriteLine("exception: " + e.ToString());
}

```

I just found your comment before I left..so I am just quicky sharing this before I left.

Let me know if this way doesn't fit on your application. Thanks.

 

 

feduss

Thanks! It workes! :)! Now i'm trying to do some queries...is not easy with this pack

Jay Cho

  :)

feduss

Sorry, i mean "/opt/usr/home/owner/app_rw/com.feduss.example.BusFinder.Tizen.Wearable/shared/res/" (in device manager, while in visual studio in BusFinder.Tizen.Wearable/shared/res/)

feduss

Sorry, nope, this file system is confusing me...the correct path of db if this from VisualStudio

 

BusFinder.Tizen.Wearable>shared/res/CTM_BUS.db

feduss

ok, new update:

I found the correct APIs to get paths, but i always get SegmentationFault in SQLiteAsyncConnection.

This is the code:

public App()
        {
            InitializeComponent();

            MainPage = new Ctm_finder.MainPage();

            String db_name = "CTM_BUS.db"; //db name
            Boolean exist = false;

            String res_path = Tizen.Applications.Application.Current.DirectoryInfo.SharedResource;
            String res_filename = Path.Combine(res_path, db_name);

            //Check if db exists
            if (File.Exists(res_filename))
            {
                String data_path = Tizen.Applications.Application.Current.DirectoryInfo.Data;
                String data_filename = Path.Combine(data_path, db_name);

                File.Copy(res_filename, data_filename);

                //Check if new file exists
                if (File.Exists(data_filename))
                {
                    //Segmentation fault
                    SQLiteAsyncConnection database = new SQLiteAsyncConnection(data_filename);
                    exist = true;
                }
                //File not copied correctly
                else exist = false;

                
            }
            //Db doesn't exist in shared/res
            else exist = false;
            
        }

That's my config:

https://imgur.com/a/HJFdtfh

Jay Cho

It's great to hear that it works with the sample code.

Alvarez

Is it know if files stored in:

Tizen.Applications.Application.Current.DirectoryInfo.Data

will survive between application updates?

feduss

I don't know, my app isn't yet on samsung store because of isn't finished yet :/

Rumata Estorish

Hi everyone! I've done like here and have following error with Tizen 5:

Method not found: 'Int32 SQLitePCL.ISQLite3Provider.sqlite3_win32_set_directory(Int32, System.String)'.

With T4 have segmentation fault as usual with null exception (Exception e, e == null)

I've included sqlite-net-base v1.7.335 and SQLitePCLRaw.provider.sqlite3.netstandard11 v1.1.14

Project setup for tizen 4.0

 

dataPath is "/opt/usr/home/owner/apps_rw/org.tizen.example.sqlite.NET/data/sqlitenet.db3"

Crashing somewhere here:

        private void InitiateSQLite(string databasePath)
        {
            // Need to initialize SQLite
            raw.SetProvider(new SQLite3Provider_sqlite3());
            raw.FreezeProvider(true);
            Database = new SQLiteConnection(dataPath);

Any tips? Thank you!

Rumata Estorish

Hi everyone! I've done like here and have following error with Tizen 5:

Method not found: 'Int32 SQLitePCL.ISQLite3Provider.sqlite3_win32_set_directory(Int32, System.String)'.

With T4 have segmentation fault as usual with null exception (Exception e, e == null)

I've included sqlite-net-base v1.7.335 and SQLitePCLRaw.provider.sqlite3.netstandard11 v1.1.14

Project setup for tizen 4.0

 

dataPath is "/opt/usr/home/owner/apps_rw/org.tizen.example.sqlite.NET/data/sqlitenet.db3"

Crashing somewhere here:

        private void InitiateSQLite(string databasePath)
        {
            // Need to initialize SQLite
            raw.SetProvider(new SQLite3Provider_sqlite3());
            raw.FreezeProvider(true);
            Database = new SQLiteConnection(dataPath);

Any tips? Thank you!

Rumata Estorish

Hi everyone! I've done like here and have following error with Tizen 5:

Method not found: 'Int32 SQLitePCL.ISQLite3Provider.sqlite3_win32_set_directory(Int32, System.String)'.

With T4 have segmentation fault as usual with null exception (Exception e, e == null)

I've included sqlite-net-base v1.7.335 and SQLitePCLRaw.provider.sqlite3.netstandard11 v1.1.14

Project setup for tizen 4.0

 

dataPath is "/opt/usr/home/owner/apps_rw/org.tizen.example.sqlite.NET/data/sqlitenet.db3"

Crashing somewhere here:

        private void InitiateSQLite(string databasePath)
        {
            // Need to initialize SQLite
            raw.SetProvider(new SQLite3Provider_sqlite3());
            raw.FreezeProvider(true);
            Database = new SQLiteConnection(dataPath);

Any tips? Thank you!

Rumata Estorish

P.S. sorry for tripple post, just accident