1
votes

I am trying to follow the below mentioned tutorials in trying to use sqlite for my windwows store app..

http://channel9.msdn.com/Shows/Visual-Studio-Toolbox/Using-SQLite-in-Windows-Store-Apps http://timheuer.com/blog/archive/2012/06/05/howto-video-using-sqlite-in-metro-style-app.aspx

But all the videos and articles where in C# and I have a small problem here..

When using sqlite as described in the above links it works fine with c# as shown below adding SQLite.cs and SQLiteAsync.cs:

Now I would like to add a class for creating a table as shown and it works for C#:

 public class person
    {

        [MaxLength(5), PrimaryKey]

        public String name { get; set; }
        [MaxLength(255)]
        public String address { get; set; }
        [MaxLength(11)]
        public Double phone { get; set; }
    }

enter image description here

Now If I do the same thing for my VB.Net project by adding same SQLite it shows me as shown below:

The class creating in VB gives me errors as shown:

enter image description hereenter image description here

an anyone say me where am I going wrong ?

1
I don't think a VB project can contain a .CS file. However you can compile CS files in a separate assembly and add a reference to this assembly to the VB project and use it. - Pawel
@Pawel is right, you can't mix and match programming languages within a single project. - WiredPrairie

1 Answers

0
votes

It has been a long time...

The workaround:

  1. Download&install sqlite-winrt81-3080803.vsix or browse here to select the product.
  2. Create the project. Go to project properties and add the reference to SQlite for Windows Runtime, in extensions tab.
  3. Install SQLitePortable package from Nuget.

Code

I hope it helps.