Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to connect to Sqlite in Visual Studio and create database?

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#?

like image 370
ITMANAGER Avatar asked Jul 01 '17 16:07

ITMANAGER


3 Answers

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

like image 122
FN90 Avatar answered Sep 21 '22 22:09

FN90


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

like image 23
Roxy'Pro Avatar answered Sep 20 '22 22:09

Roxy'Pro


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

like image 30
Skysnake Avatar answered Sep 20 '22 22:09

Skysnake