Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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ÔÚVCϵÄʹÓÃ

Ò»¡¢SQLite¼ò½é
SQLite ÊÇÓÃCÓïÑÔ±àдµÄ¿ªÔ´Êý¾Ý¿â£¬Ö÷ÒªÓÃÓÚǶÈëʽ£¬ÄãÒ²¿ÉÒÔ°ÑËü¼¯³ÉÔÚ×Ô¼ºµÄ×ÀÃæ³ÌÐòÖУ¬Ò²ÓÐÈ˽«ÆäÌæ´úAccess£¬ÓÃ×÷ºǫ́Êý¾Ý¿â¡£
SQLite Ö§³Ö¶àÊýSQL92±ê×¼£¬ÀýÈ磺Ë÷Òý¡¢ÏÞÖÆ¡¢´¥·¢ºÍ²é¿´Ö§³Ö¡£
Ö§³Ö NULL¡¢INTEGER¡¢REAL¡¢TEXT ºÍ BLOB Êý¾ÝÀàÐÍ£¬Ö§³ÖÊÂÎñ¡£
¶þ¡¢ÏÂÔØSQLite
SQLite¿ÉÒÔµ½¹Ù·½Õ¾µ ......

Unity3d ʹÓÃsqliteÊý¾Ý¿â

dbAccess.js
import System.Data; // we import our data class
import Mono.Data.SqliteClient; // we import our sqlite client

class dbAccess {
// variables for basic query access
private var connection : String;
private var dbcon : IDbConnection;
private ......

SQLite ¼ò½é

SQLite ÊÇÒ»¸öʵÏÖÁËÍ걸µÄ£¨self-contained)£¬¿ÉǶÈëµÄ(embeddable)£¬ÁãÅäÖÃ(zero-configuration)µÄSQLÊý¾Ý¿âÒýÇæµÄСÐ͵ÄCº¯Êý¿â¡£Ëü°üº¬ÒÔϵÄÌص㣺
.
    ÊÂÎñ´¦ÀíÔ­×Ó»¯(atomic)£¬Ò»Ö»¯(consistent)£¬³Ö¾Ã»¯(isolated)£¬¾øÔµ»¯(durable)£¬¼´Ê¹ÊÇÔÚϵͳ±ÀÀ£ºÍµôµçʱ
    ÁãÅäÖ㬲» ......

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 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ