wince 操作sqlite数据库
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Data.SQLite; namespace wince数据库 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { SQLiteConnection conn = new SQLiteConnection(@"data source=\Program Files\test.db"); conn.Open(); SQLiteCommand cmd = new SQLiteCommand("select * from student",conn); SQLiteDataAdapter da = new SQLiteDataAdapter(cmd); DataTable dt = new DataTable(); da.Fill(dt); dataGrid1.DataSource = dt; } } }
增加System.Data.SQLite;的引用
及Interop.066.DLL文件支持;
代码如下:
http://download.csdn.net/detail/anbylau2130/4735371