Sql queries in Visual Studio for SQLite (C#)



  • We need to be able to write requests in Sql in VS for SQLite, but the solutions found are not helpful. One of them -

    string sql = "SELECT * FROM table";
    SQLiteCommand command = new SQLiteCommand(sql, m_dbConnection);
    

    Visual studio fights SQLiteCommand that goes after 'new'. Message: "SQLiteCommand" does not contain a designer who accepts arguments 2'. I can't figure out what a mistake is, considering that such a syntax is in a big ring of sources.

    PS: Use Visual Studio 2015, SQLite.Net-PCL.



  • Add nuget-pack. https://www.nuget.org/packages/System.Data.SQLite ♪
    Add the code. using System.Data.SQLite;

    If there is no Package Manager Console in Visual Studio, nuget-packet can be manually downloaded. How do you do that? https://ru.stackoverflow.com/a/475908/196972 ♪

    UPDATE:

    For Windows 10
    ♪ https://visualstudiogallery.msdn.microsoft.com/4913e7d5-96c9-4dde-a1a1-69820d615936
    ♪ https://code.msdn.microsoft.com/windowsapps/Implement-SQLite-Local-8b13a307 ♪
    ♪ https://code.msdn.microsoft.com/windowsapps/Local-Data-Base-SQLite-for-5e6146aa#content




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2