简体   繁体   中英

SQLite + Visual Studio 2013 Express - design-time Support issue

I am trying to decide if I can use Visual C# 2013 Express Edition with SQLite for a project that I am going to be working on. On the SQLite page it says:

Visual Studio design-time Support, works with all versions of Visual Studio 2005/2008/2010/2012/2013. You can add a SQLite database to the Servers list, design queries with the Query Designer, drag-and-drop tables onto a Typed DataSet, etc. Due to Visual Studio licensing restrictions, the Express Editions can no longer be supported.

What does this mean exactly? Does it just mean that I cannot 'drag and drop' control onto the Windows Form? Shouldn't I be able to reference this Assembly in my code and just work with it? Are there any other issues that this implies?

Sorry for being late with the answer, maybe it'll help others though.

Yes this means you only will be able to access SQLite db from your code not from IDE: you wont be able to connect to it from the Database Explorer etc. So it will be impossible to auto-generate a typed dataset or linq context. So you'll have to do that manually or use an old-shool approach of creating a connection and command objects, passing a query as a string etc.

    var conn = new SQLiteConnection("data source=db");
    conn.Open();
    using (SQLiteCommand cmd = conn.CreateCommand())
    {
        cmd.CommandText = "select * from customers";
        var rdr = cmd.ExecuteReader();
        while (rdr.Read())
        {
            MessageBox.Show(rdr["name"].ToString());
        }

    }

ps: you'd better download an appropriate nuget package by rightclicking References in the Solution Explorer than get assemblies from the sqlite site. much easier.

pps: to manage db structure i use SQLite2009 Pro, its free and quite handy.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM