之前为了做这个东西到处问,到处找,人都要疯了都没弄出个所以然~照着MSDN上的来做都没用啊!NND,搞了半天是他没有说完全!今天在优快云上的一篇帖子里终于看见一个帖子说这事!终于搞清楚是咋回事了!
行,接下来我就把我做了改动的代码写出来
作者原来的是还做了一个对比,找出不同的地方来再同步~不知道两者到底有没有差别,我感觉应该是没有差别的~不管了,先把代码放上来
private SQLiteConnection connection = null;
private SQLiteCommand selectCommand = null;
private SQLiteDataAdapter dataAdapter = null;
private SQLiteConnectionStringBuilder sb = new SQLiteConnectionStringBuilder();
DataTable data;
private string connectionString = "";
public Form1()
{
InitializeComponent();
sb.DataSource = "C:\\Users\\ASUS\\Desktop\\aaa";
connectionString = sb.ToString();
}
private void Form1_Load(object sender, EventArgs e)
{
connection = new SQLiteConnection(connectionString);
selectCommand = connection.CreateCommand();
selectCom
C#与SQLite数据库同步:datagridview实战解析

本文介绍了如何在C#中实现datagridview与SQLite数据库的同步,作者在经历困难后,在优快云论坛找到解决方案。文章分享了作者修改后的代码,虽然原作者提供了对比不同进行同步的方法,但作者认为两者效果可能相同。
最低0.47元/天 解锁文章
3692

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



