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

SQLiteÊý¾Ý¿âÁ¬½Ó·½Ê½

SQLiteÊý¾Ý¿âÁ¬½Ó·½Ê½
 
SQLite.NET
Type:    .NET Framework Class Library
Usage:  System.Data.SQLite.SQLiteConnection
Basic
Data Source=filename;Version=3;
Version 2 is not supported by this class library.
 Using UTF16
Data Source=filename;Version=3;UseUTF16Encoding=True;
 With password
Data Source=filename;Version=3;Password=myPassword;
 Using the pre 3.3x database format
Data Source=filename;Version=3;Legacy Format=True;
 With connection pooling
Connection pooling is not enabled by default. Use the following parameters to control the connection pooling mechanism.
Data Source=filename;Version=3;Pooling=False;Max Pool Size=100;
 Read only connection
Data Source=filename;Version=3;Read Only=True;
 
Using DateTime.Ticks as datetime format
Data Source=filename;Version=3;DateTimeFormat=Ticks;
The default value is ISO8601 which activates the use of the ISO8601 datetime format
 
Store GUID as text
Normally, GUIDs are stored in a binary format. Use this connection string to store GUIDs as text.
Data Source=filename;Version=3;BinaryGUID=False;
Note that storing GUIDs as text uses more space in the database.
 
Specify cache size
Data Source=filename;Version=3;Cache Size=2000;
The Cache Size value measured in bytes
 
Specify page size
Data Source=filename;Version=3;Page Size=1024;
The Page Size value measured in bytes
 
Disable enlistment in distributed transactions
Data Source=filename;Version=3;Enlist=N;
 
 Disable enlistment in distributed transactions
Data Source=filename;Version=3;Enlist=N;
 
Disable create database behaviour
If
the database file doesn't exist, the default behaviour is to create a
new file. Use the following parameter to raise an error instead of
creating a new database file.
Data Source=filename;Version=3;FailIfMissing=True;
  Limit the size of database
Data Source=filename;Version=3;Max Page Count=5000


Ïà¹ØÎĵµ£º

SQLiteÊý¾Ý¿â

@ǶÈëʽ¹ØÏµÐÍÊý¾Ý¿âSQLite
    ÌØµã
        1.Ö§³ÖÎåÖÖÊý¾ÝÀàÐÍ null,INTEGER,REAL(¸¡µãÊý),TEXT(×Ö·û´®Îı¾)ºÍBLOB£¨¶þ½øÖÆÎı¾£©Êý¾ÝÀàÐÍ£¬ËäÈ»
        ËüÖ»ÓÐÎåÖÖ£¬µ«Êµ¼ÊÉÏsqlite3Ò²½ÓÊÖvarcher(n),char(n),decimal(p,s)µÈÊý¾ÝÀàÐÍ£ ......

LinuxÏ´´½¨Êý¾Ý¿â±í£¨sqlite3£©µÄ½Å±¾

±¾ÎÄÒÔÊý¾Ý¿âÖеÄÊý¾Ý±íUserInfoΪʵÀýչʾÊý¾Ý¿â±íµÄ´´½¨¼°Êý¾Ý¼Ç¼µÄ¼Èë¡£
#!/bin/sh
#variables definition
#database location
db=/conf/db
#
#create table userInfo
#name: User name
#passwd: Password
#Privilege: User privilege -- Administrator:0 Operator:1
#
echo "create table UserInfo(n ......

iphone¿ª·¢ SQLiteÊý¾Ý¿âʹÓÃ

ÎÒÏÖÔÚҪʹÓÃSQLite3.0´´½¨Ò»¸öÊý¾Ý¿â£¬È»ºóÔÚÊý¾Ý¿âÖд´½¨Ò»¸ö±í¸ñ¡£
Ê×ÏÈÒªÒýÈëSQLite3.0µÄlib¿â¡£È»ºó°üº¬Í·Îļþ#import <sqlite3.h>
¡¾1¡¿´ò¿ªÊý¾Ý¿â£¬Èç¹ûûÓУ¬ÄÇô´´½¨Ò»¸ö
sqlite3* database_;
-(BOOL) open{
       NSArray *paths = NSSearchPathForDirectoriesInDomai ......

Ò»¸ö¹ØÓÚSQLiteС³ÌÐò £¬Çë´ó¼Ò¶à¶àÖ¸½Ì£¡

package com.jiao.sqlite;
import android.app.Activity;
import android.database.Cursor;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widg ......

×ܽáSQLite²»Ö§³ÖµÄSQLÓï·¨ÓÐÄÄЩ


1 TOP
ÕâÊÇÒ»¸ö´ó¼Ò¾­³£Îʵ½µÄÎÊÌ⣬ÀýÈçÔÚSQLSERVERÖпÉÒÔʹÓÃÈçÏÂÓï¾äÀ´È¡µÃ¼Ç¼¼¯ÖеÄǰʮÌõ¼Ç¼£º
SELECT TOP 10 * from [index] ORDER BY indexid DESC;
 
µ«ÊÇÕâÌõSQLÓï¾äÔÚSQLiteÖÐÊÇÎÞ·¨Ö´Ðеģ¬Ó¦¸Ã¸ÄΪ£º
SELECT * from [index] ORDER BY indexid DESC limit 0,10;
 
ÆäÖÐlimit 0,10±íʾ´ÓµÚ0 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ