STUDYING/C#

[WPF] Sqlite 사용하기

l_j_yeon 2017. 9. 1. 14:38

1. System.Data.SqLite 설치하기


Connection열기 (App.xaml.cs파일에 전역으로 넣어놓기)
//sqlite가 없으면 생성


create table (table이 존재하면 생성하기)

: 만약 이렇게 해주지 않는다면 application을 실행할때마다 table이 새로 생성


select table


insert table


delete table


Application시작시 한번만 실행되는 코드

//1. sqlite가 없으면 생성

//2. table이 없으면 생성

//3. Connection열기