CodeSmith+SQLite+VS2010开发环境搭配
Codsmith软件下载页面:http://www.ibeifeng.com/down.php?id=36606
CodeSmith开发系列资料总结http://terrylee.cnblogs.com/archive/2005/12/28/306254.aspxSQLite驱动下载页面:http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki Navicat for SQLite管理工具下载页面:http://www.pc6.com/softview/SoftView_57268.html
下载三个驱动文件: http://system.data.sqlite.org/downloads/1.0.82.0/sqlite-netFx40-setup-bundle-x86-2010-1.0.82.0.exe 实际上只要装此集合包就行了,装之前关闭VS2010 , 之后打开服务器资源管理器 -> 添加连接 http://system.data.sqlite.org/downloads/1.0.82.0/sqlite-netFx40-setup-x86-2010-1.0.82.0.exe http://sourceforge.net/projects/sqlite-dotnet2/files/SQLite%20for%20ADO.NET%202.0/(选择最新版本的SQLite-1.0.66.0-setup.exe下载) 下载: SQLite-1.0.66.0-setup.exe C开发环境中 ,需要下载sqlite源码包,其中引入sqlite3.c、sqlite.h即可 下载: sqlite-amalgamation-3071400.zip
//创建一个数据库文件 //连接数据库 //创建表 //插入数据 //取出数据 //select c.rowid from userinfo可以获取到数据库行id cmd.CommandText = sql; SQLiteDataReader reader = cmd.ExecuteReader(); String username = ""; String password = ""; while (reader.Read()) { username = reader.GetString(1); password = reader.GetString(2); } MessageBox.Show(username + ";" + password); (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |