.net·ÃÎÊSQLiteÎÊÌâ
ÎÒ°²×°ÁËÒ»¸ösqlite developer,Ò»¸ö¿ÉÊÓ»¯µÄ¹¤¾ß¡£
½Ó×Å£¬ÎÒÓÖ°²×°ÁËSQLite.NET,²¢ÔÚVSÀïÃæÌí¼ÓºÃÁËdll¡£
ÏÖÔÚ£¬ÎÒÔÚsqlite developerÀï´´½¨ÁËÒ»¸öÊý¾Ý¿â£¬¿âÖаüº¬ÎÒ×Ô¼º¶¨ÒåµÄÒ»ÕÅ±í¡£
ÎÊÌ⣺ÈçºÎʹÓÃVS²é¿´ÎÒÔÚsqlite developerÖд´½¨µÄ±í¡£
ºÜ¼±°¡£¬ËÄܽâ¾öһϣ¿
SQLiteConnection cnn = new SQLiteConnection();
cnn.ConnectionString = @"Data Source=C:\Program Files\SharpPlus\SqliteDev\myFirstDB";
cnn.Open();
SQLiteCommand cmd = new SQLiteCommand();
cmd.Connection = cnn;
cmd.CommandText = "select * from maintable";
SQLiteDataAdapter da = new SQLiteDataAdapter();
da.SelectCommand = cmd;
DataSet ds = new DataSet();
da.Fill(ds);
this.dataGridView1.DataSource = ds.Tables[0];
»¹Êǵÿ¿×Ô¼º°¡£¡£¡£¡£¡£¡
ÓеÄʱºòGoogleһϱÈÔÚÕâÀïµÈÒª¿ì£¬ºÇºÇ
Ëû˵̫³¤ÁË¡£¡£¡£¿¿£¬Ö»ÄÜ·ÖÁ½¶Î
C# code
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlight
Ïà¹ØÎÊ´ð£º
СµÜ Ūµã¶«Î÷¿ÉÊǵ÷Óà sqlite3_prepare Õâ¸öº¯Êý select ¾ÍºÃʹ Ö»Òª ¸Ä±äÊý¾Ý¿â µÄ¾Í²»ÐÐ ±ÈÈçinsert Ö®ÀàµÄ ËÀ´°ï¸öæ°¡ ÇëÎÊÕâÊÇʲôÔÒò °¡ Óà c ȥʵÏÖµÄ
ÄãÓõÄʲô¹¤¾ß°¡?
°ÑÄã×Ô¼ºµÄ´úÂë·¢ ......
¸üÐÂÓï¾äÖУº
UPDATE sc SET AA=INT(BB)
ÎÒÏëÈÃAAµÃµ½BBµÄÕûÊýÖµ¡£¿ÉÊÇÔËÐб¨´í¡£
²»ÖªµÀSQLiteÏ ȡÕûÊý²¿·ÖµÄº¯ÊýÊÇÄĸö£¿£¨ËÄÉáÎåÈëµÄº¯ÊýÓÖÊÇÄĸö£¿£©¡£
Èç¹ûÖªµÀ»¹ÓÐÆäËûº¯ÊýÇëÒ»²¢¸æÖª£¬Ð»Ð»¡£
ROUND
......
ΪʲôÓÃselect name,distinct phone from phone_book¾Í˵Óï·¨´íÎó£¬
ÓÃselect distinct phone,name from phone_book¾Í¿ÉÒÔ£¿
ûÓÐΪʲô distinct ÊÇ select µÄÐÞÊηû£¬Ö»ÄÜÔÚ select ºóÖ ......
GUID£º0C3EDEE8-B14F-4220-8D64-990E00D84AF7
SELECT fldGuid, fldName, fldUserGuid from table
Äܲéѯ fldUserGuid Ϊ£º0C3EDEE8-B14F-4220-8D64-990E00D84AF7 µÄÊý¾ÝÒ»Ìõ
SELECT fldGuid, fldN ......
¿ª·¢ÓïÑÔ£ºevc
Êý¾Ý¿â£ºSQLite
˵Ã÷£ºÓÐÁ½¸ö½çÃæ
½çÃæÒ»¸öÊÇÓÃÀ´½¨Á¢Êý¾Ý¿â£¬²¢ÇÒ½øÐÐÊý¾Ý¹ÜÀí¹¦ÄÜ£¬°üÀ¨ctrlist¿Ø¼þÏÔʾÊý¾Ý¿âÄÚÈÝ£¬Ôö¼Ó£¬É¾³ý£¬Ð޸ĵȹ¦ÄÜ£»
½çÃæ¶þ£¬Êǵ÷ÓÃÊý¾Ý¿â£¬½øÐвéѯ£¬ÏÔʾ½á ......