wince 5.0 ¿ª·¢sqliteÊý¾Ý¿âµÄÎÊÌâ
ÓÃevc±àдӦÓóÌÐò£¬¿ª·¢Êý¾Ý¿â¹ÜÀíϵͳ¡£ÉèÖÃencodingΪUTF-8£¬Äܹ»²åÈëÖÐÎÄÊý¾Ý£¬ÓÃSQLite Expert Personal¿´Êý¾Ý¿â£¬ÖÐÎÄÕý³£¡£±ðµÄ³ÌÐò²éѯÊý¾Ý¿â£¬²¢ÏÔʾÓÚEDIT¿Ø¼þÖУ¬Õý³£¡£µ«ÊÇʹÓÃlist control ¿Ø¼þ£¬²éѯÊý¾Ý¿â£¬ÏÔʾ¿Ø¼þÉÏ£¬³öÏÖÁËÖÐÎÄÂÒÂëµÄÎÊÌ⣬Çë½ÌÒ»ÏÂÊÇʲôÔÒò£¿
¼ÈÈ»Edit¿ÉÒÔ£¬Èç¹û±àÂëÊÇÒ»ÖµĻ°£¬list controlÓ¦¸ÃҲûÎÊÌâ¡£Êý¾ÝÊÇͬÑùµÄÊý¾Ýô£¿ÒýÓà ¼ÈÈ»Edit¿ÉÒÔ£¬Èç¹û±àÂëÊÇÒ»ÖµĻ°£¬list controlÓ¦¸ÃҲûÎÊÌâ¡£Êý¾ÝÊÇͬÑùµÄÊý¾Ýô£¿ ÊÇͬÑùµÄÊý¾Ý£¬ÎÒ»³ÒÉÓпÉÄÜÊÇÔÚ²éѯʱ£¬Ê¹ÓÃsqlite_get_table();º¯ÊýµÄʱºò·µ»ØµÄÊý¾ÝÀàÐͲ»¶Ô£¬ÓÐÏë²»³öʲô°ì·¨£¬ËùÒÔÀ´ÎÊÎÊ£¬Çë½ÌÏ¡£ÒýÓà ¿´¿´AddString֮ǰÊ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; pListCtrl->DeleteAllItems(); <
Ïà¹ØÎÊ´ð£º
СµÜ Ūµã¶«Î÷¿ÉÊǵ÷Óà sqlite3_prepare Õâ¸öº¯Êý select ¾ÍºÃʹ Ö»Òª ¸Ä±äÊý¾Ý¿â µÄ¾Í²»ÐÐ ±ÈÈçinsert Ö®ÀàµÄ ËÀ´°ï¸öæ°¡ ÇëÎÊÕâÊÇʲôÔÒò °¡ Óà c ȥʵÏÖµÄ ÄãÓõÄʲô¹¤¾ß°¡? °ÑÄã×Ô¼ºµÄ´úÂë·¢ ......
´ó¼ÒºÃ, ÉÏÀñ°ÝÓÐÀ´ÎÊ˵ÈçºÎ´ÓlinuxÉÏ·ÖÏí³ösqliteµÄdbÊý¾ÝÈÃwindows²Ù×÷, ºóÀ´Ò»Ö±ÎÞ·¨Ö±½Ó͸¹ýip·½Ê½Äõ½µµ°¸, Ïë˵¸ÄÓÃftp·½Ê½¶ÁµµÐ´Èëºó, ÔÙÉÏ´«»Ølinux server, ÏÖÔÚÓиöÎÊÌâµ±win pc¿ªÆôdbµµ°¸ºó, ºÃÏñ»áËø×¡Ë ......
SQL code: SELECT a1.FileID AS FileID, SUM( a1.Count + a2.Count + a3.Count + a4.Count ) AS Count from gmpTableWordList AS a1 INNER JOIN gmpTableWordList AS a2 INNER JOIN gmpTableWordList AS a3 IN ......
ΪʲôÓÃselect name,distinct phone from phone_book¾Í˵Óï·¨´íÎó£¬ ÓÃselect distinct phone,name from phone_book¾Í¿ÉÒÔ£¿ ûÓÐΪʲô distinct ÊÇ select µÄÐÞÊηû£¬Ö»ÄÜÔÚ select ºóÖ ......