How to create a SQLite database compatible with Windows 8 App?

Issue #42 closed
Алексей Макаров created an issue

The problem is related to the establishment of the connection (post) Could you give instructions on creation the connection. I do not quite understand how to solve the problem today.

May be necessary to use the library SQLite.Net PCL - WinRT Platform 2.4.1?

Thank you very much

Comments (5)

  1. Алексей Макаров reporter

    Can support Win32 and WinRT... How can I create a project from scratch? How create connection use Platform.Win32..... Which extensions you need to install and in what order ... Thank you so much for your help. I am writing an application and I need support relationships between tables. Thank U! (Google translate)

    using System.Collections.Generic;
    using System.Linq;
    using NUnit.Framework;
    using SQLite.Net.Attributes;
    
    #if __WIN32__
    using SQLitePlatformTest = SQLite.Net.Platform.Win32.SQLitePlatformWin32;
    #elif WINDOWS_PHONE
    using SQLitePlatformTest = SQLite.Net.Platform.WindowsPhone8.SQLitePlatformWP8;
    #elif __WINRT__
    using SQLitePlatformTest = SQLite.Net.Platform.WinRT.SQLitePlatformWinRT;
    #elif __IOS__
    using SQLitePlatformTest = SQLite.Net.Platform.XamarinIOS.SQLitePlatformIOS;
    #elif __ANDROID__
    using SQLitePlatformTest = SQLite.Net.Platform.XamarinAndroid.SQLitePlatformAndroid;
    #else
    using SQLitePlatformTest = SQLite.Net.Platform.Generic.SQLitePlatformGeneric;
    #endif
    
    
    namespace SQLite.Net.Tests
    {
        [TestFixture]
        public class IgnoredTest
        {
            public class DummyClass
            {
                [PrimaryKey, AutoIncrement]
                public int Id { get; set; }
    
                public string Foo { get; set; }
                public string Bar { get; set; }
    
                [Attributes.Ignore]
                public List<string> Ignored { get; set; }
            }
    
            [Test]
            public void NullableFloat()
            {
                var db = new SQLiteConnection(new SQLitePlatformTest(), TestPath.GetTempFileName());
                // if the Ignored property is not ignore this will cause an exception
                db.CreateTable<DummyClass>();
            }
        }
    }
    
  2. Guillermo Gutiérrez

    More than one month with no response. I'm closing the issue. Feel free to open it again if you experience problems in the future.

  3. Log in to comment