2012年12月16日
摘要: SQLite.NETType .NET Framework Class LibraryUsage System.Data.SQLite.SQLiteConnectionManufacturer SQLiteMore info and class library downloadsSet example values BasicData Source=c:\mydb.db;Version=3;Version 2 is not supported by this class library. In-Memory DatabaseAn SQLite database is normally stor 阅读全文
posted @ 2012-12-16 18:32 武胜-阿伟 阅读(2556) 评论(0) 推荐(0)
摘要: SQLite的连接字符串Basic(基本的) Data Source=filename;Version=3;Using UTF16(使用UTF16编码) Data Source=filename;Version=3;UseUTF16Encoding=True;With password(带密码的) Data Source=filename;Version=3;Password=myPassword;Using the pre 3.3x database format(使用3.3x前数据库格式) Data Source=filename;Version=3;Legacy Format=True; 阅读全文
posted @ 2012-12-16 18:30 武胜-阿伟 阅读(22829) 评论(0) 推荐(3)
摘要: Sqlite对Guid数据的处理首先明确两点:1.Sqlite对Guid的存储方式是将Guid以16位byte[]的形式顺序保存在数据库中。2.C#中的Guid对象实际上就是16位byte[],但其表达方式并不是按照byte数组顺序的(具体可以查阅MSDN,这也就是为什么Guid.ToString时显示的以“-”间隔的长度不等的原因),这是导致C#和Sqlite中Guid不匹配的本质原因。解决方法:C#toSqlite:stringsql=string.Format("selectx'{0}'",BitConverter.ToString(id1.ToByt 阅读全文
posted @ 2012-12-16 18:29 武胜-阿伟 阅读(3375) 评论(0) 推荐(0)