How to install Sqlite to be part of a C#project?

Asked

Viewed 989 times

4

I am creating a desktop application in C# of registration that will use database. Which database to use?

I was advised to use the Sqlite, but I’m not quite sure how to use it.

  1. Which version of Sqlite should I download, could help me with the link?
  2. Which manager should I use to create the database and tables? Visual Studio has this tool?
  3. How to integrate the bank to be part of the project, so that in the installation it is installed together?
  • Take a look at [tour]. You can accept an answer if it solved your problem. You can vote on every post on the site as well. Did any help you more? You need something to be improved?

  • Hello, I made an application based on the examples Of this Site One thing, if Voce wants the ID field to be autoincrement, do not build the file with the extension . sqlite build with the extension . db

2 answers

5

Which version of Sqlite should I download, could help me with the link?

The latest Nuget package. This version works for 32 and 64 bits.

Which manager should I use to create the database and tables? Visual Studio has this tool?

The tools for Visual Studio are here.

How to integrate the bank to be part of the project, so that in the installation it is installed together?

The Sqlite database is a file, so just put this file in the project directories (usually the directory App_Data).

Otherwise, point your Connection string for the file. The ideal is by configuration, but can be by code as well.

new SQLiteConnection("Data Source=C:\Diretorio\banco.sqlite;Version=3;");

4

The question is broad, generic, I will answer it this way, if you need details ask more specific questions with details than you need.

Must download the newest version. But it has a lot of option, have to see what you need. The download can be done in official page. It has to match the . NET you are using and which operating system will run. You’d better get the Nuget. The most recommended is this. But others may be needed as you develop and want to improve the experience.

The closest thing to help with Visual Studio is this here. In general people use much better external tools.

The database file is a file like any other, need no installation, nothing. Just copy it with the rest of the application.

  • https://www.sqlite.org/cvstrac/wiki?p=ManagementTools no longer exists.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.