Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

SQLite Êý¾Ý¿â¼ÓÃܵÄÒ»ÖÖ½â¾ö·½°¸


sqlite3 *db;
   
sqlite3_stmt *stat;
   
char
*zErrMsg = 0;
   
char
temp[256], FileRoot[256];
   
char
buffer2[1024]="0";
 
   
sprintf(temp, _T("%s"), _T("utf.db"));
   
CCodingConv::GB2312_2_UTF8(FileRoot, 256, temp, 0);
   
sqlite3_open(FileRoot, &db);
 
   
if
(db == NULL)
   
{
       
return
-1;
   
}
 
   
sqlite3_key(db,"1q2w3e4r",8);
 
   
sqlite3_exec(db, "CREATE TABLE list (fliename varchar(128) UNIQUE, fzip text);", 0, 0, &zErrMsg);
   
sqlite3_prepare(db, "insert into list values ('
ÖÐÎÄGB2312
±àÂë',?);", -1, &stat, 0);
 
   
strcpy(temp, "
²âÊÔÊý¾ÝUTF-8
µÄÖ§³ÖÇé¿ö");
   
int
len = (int
)strlen(temp);
 
   
sqlite3_bind_text(stat, 1, temp, len, NULL);
   
sqlite3_step(stat);
 
   
sqlite3_prepare(db, "select * from list;", -1, &stat, 0);
   
sqlite3_step(stat);
 
   
const
unsigned
char
* test = sqlite3_column_text(stat, 1);
   
int
size = sqlite3_column_bytes(stat, 1);
 
   
printf("%s", test);
 
   
sqlite3_finalize(stat);
   
//sqlite3_rekey(db,"",0);
   
sqlite3_close(db);
 
(vc2003)http://www.sqlite.com.cn/Upfiles/source/sqlite3crypt.rar
(vs2005)http://www.sqlite.com.cn/Upfiles/source/sqlite3_3_7_key.rar


Ïà¹ØÎĵµ£º

SQLite 3 ÔÓ¼Ç

1¡¢ÈçºÎµÃµ½×îºó²åÈëÏîµÄ×Ô¶¯Ôö³¤IDÖµ£¿ ¶ÔÓ¦µÄC#´úÂë¶ÎÈçÏ£º

using (SQLiteConnection cn = new SQLiteConnection (¡°data source = Test.db¡±))
{
      cn.Open ();

      SQLiteCommand cmd = new SQLiteCommand ......

sqlite Êý¾Ý¿â¿ÉÊÓ»¯²é¿´Ð޸ķÖÎö¹¤¾ßsqlitebrowser


SQLite Database Browser
 
 
SQLite Database browser is a light GUI editor for SQLite databases, built on top of Qt. The main goal of the project is to allow non-technical users to create, modify and edit SQLite databases using a set of wizards and a spreadsheet-like interface.
Downlo ......

2010ÄêSQLiteѧϰ±Ê¼ÇÖ®Ò»


2010ÄêSQLiteѧϰ±Ê¼ÇÖ®Ò»
Ò»£®            ÈçºÎ»ñÈ¡SQLite×îа汾
¹Ù·½Õ¾µã£ºhttp://www.sqlite.org/
´Óhttp://www.sqlite.org/ÍøÕ¾µÄDownloadÒ³Ãæ»ñÈ¡
¼´ÈçÏÂÒ³ÃæÏÂÔØ
http://www.sqlite.org/download.html
¶þ£®WindowsϵÄSQLiteµÄÔ´´úÂëÊÇÄĸöÈí¼þÑ¹Ë ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ