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

SQLiteÖÐÎÄÂÒÂëÎÊÌâ

ÓÃevc±àдӦÓóÌÐò£¬¿ª·¢Êý¾Ý¿â¹ÜÀíϵͳ¡£ÉèÖÃencodingΪUTF-8£¬Äܹ»²åÈëÖÐÎÄÊý¾Ý£¬ÓÃSQLite Expert Personal¿´Êý¾Ý¿â£¬ÖÐÎÄÕý³£¡£±ðµÄ³ÌÐò²éѯÊý¾Ý¿â£¬²¢ÏÔʾÓÚEDIT¿Ø¼þÖУ¬Õý³£¡£µ«ÊÇʹÓÃlist control ¿Ø¼þ£¬²éѯÊý¾Ý¿â£¬ÏÔʾ¿Ø¼þÉÏ£¬³öÏÖÁËÖÐÎÄÂÒÂëµÄÎÊÌ⣬Çë½ÌÒ»ÏÂÊÇʲôԭÒò


ÒýÓÃ
Ó¦¸Ã»¹ÊDZàÂëµÄÎÊÌ⣬

ÔÙ³¢ÊÔһϸıä±àÂëÉèÖ÷½ÃæµÄ²âÊÔ

ÎÒÈ·¶¨ÁË´íÎóµÄµØ·½£¬¾ÍÊÇÔÚ¶ÁÊý¾Ý¿âÊý¾Ý£¨UTF-8£©ÏÔʾÔÚlist control¿Ø¼þÊÇ£¬list¿Ø¼þÈç¹û¶Áµ½µÄÊý¾ÝΪUTF-16µÄ£¬¾ÍÕýÈ·ÁË£¬ËùÒÔÎÒÐèÒª½â¾öµÄÊÂÇé¾ÍÊÇ£¬¶ÁÊý¾Ý¿âÊý¾Ý£¨UTF-8£©£¬×ª»»ÎªUTF-16£¬È»ºóÏÔʾ£¬Ó¦¸Ã¾ÍokÁË¡£
¼ÌÐøÑо¿£¬acmain_chm£¬ÓкõĽ¨ÒéÇëÖ¸µã¹þ~~~~ÏÂÃæÊdzöÎÊÌâµÄ´úÂë¶Î
void CKLMDlg::OnRefresh()
{
    int i = 0 ;
    int nrow = 0, ncolumn = 0;
    char **azResult=NULL; //¶þάÊý×é´æ·Å½á¹û
char *zErrMsg = 0;
    int index,j;
    int nItem;
    int result;
    CListCtrl * pListCtrl = (CListCtrl*)GetDlgItem(IDC_LIST2);
    CRect rt;
    pListCtrl->GetClientRect(&rt);
    char *sql = "SELECT * from Fault";
/****************************************************************************************************************/
    result=sqlite3_get_table( db , sql , &azResult , &nrow , &ncolumn,&zErrMsg );
    index = ncolumn;


Ïà¹ØÎÊ´ð£º

ÊìϤSqliteµÄÇë½øÀ´£¡£¡£¡£¡£¡

´ó¼ÒºÃ£¡
  sqlite×Ö¶ÎΪfloatÐ͵ÄÖµÔõÑù·ÃÎÊ£¿
ÊÔ¹ýÓÃsqlite3_column_double£¬È··µ»ØµÄÊý¾Ý²»ÕýÈ·£»
ûÓùý,°ï¶¥.

Ò»Ñù°¡£¬·µ»ØÈ«ÊÇ string

ÄãµÄ´úÂëÊÇʲô£¿
double sqlite3_column_double(sqli ......

sqliteÖ®Database is lockedÎÊÌâ

»·¾³£ºQNX 6.3.2
°æ±¾£ºSQLite 2.7.3
ÏÖÏó£ºÔÚÃüÁîÐÐÏÂsqlite½øÈ¥£¬Ö´ÐÐ.table¡¢pragmaÖ®Àà¡¢select¶¼Ìáʾ
 database is locked
Ææ¹ÖµÄÊÇ£¬¼´Ê¹ÊÇд´½¨Ò»¸öÊý¾Ý¿â£¬Ö´ÐÐÉÏÊöÃüÁîÒ²ÊÇÄÇÑù¡£
Áí£ºÔÚһ̨Íê ......

sqlite ×Ö¶ÎĬÈÏÖµµÈÓÚidÖµ

sqlite ÖÐ
CREATE TABLE table1 (
id integer primary key autoincrement,
name text default '',
[index] integer default ROWID
)

ÓÐûÓÐÀàËƵŦÄÜ£¬Èà index µÄֵĬÈϵÈÓÚid£¬ ......

Win7ÏÂIIS·ÃÎÊSqliteÊý¾Ý¿â±¨´í

ÎÒÖªµÀ´ó¼Ò¶¼ËµÊÇ64λϵͳϲ»ÄÜÓÃ32λµÄsyste.sqlite.dll¡£Õâ¸öÎÒÒѾ­»»ÁË
VS2008ÖÐÔËÐж¼Ã»ÎÊÌ⣨ͬһϵͳÏ£©
Ò»·Åµ½IISÖоͱ¨´í£º
δÄܼÓÔØÎļþ»ò³ÌÐò¼¯¡°System.Data.SQLite¡±»òËüµÄijһ¸öÒÀÀµÏî¡£ÊÔͼ¼ÓÔظ ......

sqlite dinstincÎÊÌâ

ΪʲôÓÃselect name,distinct phone from phone_book¾Í˵Óï·¨´íÎó£¬
      ÓÃselect distinct phone,name from phone_book¾Í¿ÉÒÔ£¿
ûÓÐΪʲô distinct ÊÇ select µÄÐÞÊηû£¬Ö»ÄÜÔÚ select ºóÖ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ