string conn = "data source=.sdf;persist security info=false;password=";
SqlCeConnection con;
try
{
con = new SqlCeConnection(conn);
con.Open();
SqlCeCommand cmd = new SqlCeCommand("select*from ", con);
SqlCeDataReader reader = cmd.ExecuteReader();
while (reader.Read())
{
}
con.Close();
简单记录一下,c#sqlce的读取操作
本文展示了一种使用SqlCeConnection连接到SQLite数据库并执行基本查询的方法。代码示例包括设置连接字符串、打开连接、创建命令对象、执行读取操作以及关闭连接。
1644

被折叠的 条评论
为什么被折叠?



