.net 调用data.sqlite

前端之家收集整理的这篇文章主要介绍了.net 调用data.sqlite前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
String nowPath = @"taxi.db";

void SelectStu()
{
using (sqliteConnection cn = new sqliteConnection(@"data source=" + nowPath + ";pooling=true;failifmissing=false"))
{
cn.Open();
using (sqliteCommand cmd = new sqliteCommand())
{
cmd.Connection = cn;
cmd.CommandText = "select from Student";
using (sqliteDataReader dr = cmd.ExecuteReader())
{
List<Student> stuList;
while (dr.Read())
{
Student node = new Student();
//Response.Write("<script>alert('" + dr.GetValue(1).ToString() + "')</script");
node.Str_pass = dr.GetValue(0).ToString();
node.Stu_name = dr.GetValue(1).ToString();
node.Stu_num = dr.GetValue(2).ToString();
}
}
}

}
}

猜你在找的Sqlite相关文章