7

I can not find any way to connect to Sqlite in Visual Studio(Winform project).

I have installed libraries Sqlite using Nget manager.

In data source(left sidebar) I can not see connection to Sqlite, only SQL:

Sqlite references

enter image description here

Should I install a Slite database on the user's computer or the database will be built into the .exe program?

I tried to create database using SqliteMaestro, it saved databse file in program directory without extension as database. May I add this file to solution C#?

ITMANAGER
  • 131
  • 1
  • 3
  • 10

3 Answers3

15

In case somebody had the same issue. You may need to install SQLite Data Provider by downloading the suitable version from here.

Check SQLite/SQL Server Compact Toolbox, it is a great tool to manage SQLite databases in Visual Studio (like SQL Server Explorer).

enter image description here

FN90
  • 421
  • 4
  • 13
1

ADO.NET 2.0 Provider for SQLite has over 200 downloads every day, so I think you should use that one.

Go and download it and after that you should be able to connect to a sqlite database from your Visual Studio.

Sometimes Google is all you need..

ALSO CHECK FOR THIS LINK

Roxy'Pro
  • 4,216
  • 9
  • 40
  • 102
  • Can I install this using Nuget? Should I install a Slite database on the user's computer or the database will be built into the .exe program? – ITMANAGER Jul 01 '17 at 17:14
  • @ITMANAGER What do you mean user's computer, it depends, if user is gonna connect to some remote sqllite database than you don't need because there will be defined connection string in your database and that's all you need to connect to a database, if it's going to be a local database than you should. – Roxy'Pro Jul 01 '17 at 17:16
  • I mean when compiled program will be run in another computer. Can I create database in VS? – ITMANAGER Jul 01 '17 at 17:26
  • Last question, I try to connect to db as: `dbConnection = "Data Source=tests.DB;Password=;";`. But file is located by path: `debug/Tests.db` in project folder. How to specify full path? – ITMANAGER Jul 01 '17 at 17:53
1

Windows version? SQLite support is now default on Windows 10. Have you tried the ODBC DSN under Settings?

Skysnake
  • 99
  • 1
  • 5