.下载最新版SQLite(http://www.sqlite.org/download.html),其他版本也可以。
a.解压后copy c:\sqlite-3_5-0
b.进入cmd模式,进入sqlite-3_5_0目录,执行sqlite3 mytest.db
c.create table mytable1 (seq int,desc varchar(8));insert into mytable1 values (1,'Project');资料建立完成
2.下载System.Data.SQLite(http://sqlite.phxsoftware.com/),安装
3.打开VS2005,参考System.Data.SQLite安装目录下的System.Data.SQLite.DLL
SQLiteConnection cnn = new SQLiteConnection();
cnn.ConnectionString = @"Data Source=c:sqlite-3_5_0mytest.db";
cnn.Open();
SQLiteCommand cmd = new SQLiteCommand();
cmd.Connection = cnn;
cmd.CommandText = "SELECT * FROM mytable1";
SQLiteDataAdapter da = new SQLiteDataAdapter();
da.SelectCommand = cmd;
DataSet ds = new DataSet();
da.Fill(ds);
本文作者:边城骆驼 来源:http://blog.csdn.net/marvinhong/
CIO之家 www.ciozj.com 微信公众号:imciow