---
title: "C# 访问 SQLite"
author: "heiyan"
date: "2011-03-19T21:30:00Z"
tags: []
slug: "c-sqlite"
draft: false
lastmod: "2011-10-02T18:55:04Z"
id: 1184726
url: "https://heiyan.iteye.com/blog/1184726"
---

SQLite 个人感觉比access有意思多了。

C#访问sqlite 和访问access一样方便。

主要得益于

## ADO.NET 2.0 Provider for SQLite

这个是一个开源的项目

[http://sourceforge.net/projects/sqlite-dotnet2/](http://sourceforge.net/projects/sqlite-dotnet2/)

安装好后

![](http://hi.csdn.net/attachment/201103/19/0_1300541351Y5Z5.gif)

加入命名空间 就可以用了

![](http://hi.csdn.net/attachment/201103/19/0_13005414043x1o.gif)

代码不多吧，和访问其他数据库一样吧。做个笔记防止忘记