¹ØÓÚ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];
»¹Êǵÿ¿×Ô¼º°¡£¡£¡£¡£¡£¡
{{
Ïà¹ØÎÊ´ð£º
´ó¼ÒºÃ£¡
sqlite×Ö¶ÎΪfloatÐ͵ÄÖµÔõÑù·ÃÎÊ£¿
ÊÔ¹ýÓÃsqlite3_column_double£¬È··µ»ØµÄÊý¾Ý²»ÕýÈ·£»
ûÓùý,°ï¶¥.
Ò»Ñù°¡£¬·µ»ØÈ«ÊÇ string
ÄãµÄ´úÂëÊÇʲô£¿
double sqlite3_column_double(sqli ......
¸ÕÈëÃÅ ÏëʵÏÖÐÂÎűíÐÂÎÅÖö¥µÄ¹¦ÄÜ
select * from web_news order by id desc limit 0,6
web_news ±íÀïÓÐTOPÁÐ ÔõÑùÈÃTOPÁмǼΪ1µÄΪÖÃÇ° ¸÷λ´ó´óÃÇ°ï°ïæ ·Ö²»¶à Çë°üº£¡£¡
order ......
// ´ò¿ªÊý¾Ý¿â
SQLiteConnection dconn = new System.Data.SQLite.SQLiteConnection();
dconn.ConnectionString = @"Data Source=D:\db.sdb";
dconn.Open();
SQLiteCommand dcmd = dconn.Crea ......
ΪʲôÓÃselect name,distinct phone from phone_book¾Í˵Óï·¨´íÎó£¬
ÓÃselect distinct phone,name from phone_book¾Í¿ÉÒÔ£¿
ûÓÐΪʲô distinct ÊÇ select µÄÐÞÊηû£¬Ö»ÄÜÔÚ select ºóÖ ......
ÓÃevc±àдӦÓóÌÐò£¬¿ª·¢Êý¾Ý¿â¹ÜÀíϵͳ¡£ÉèÖÃencodingΪUTF-8£¬Äܹ»²åÈëÖÐÎÄÊý¾Ý£¬ÓÃSQLite Expert Personal¿´Êý¾Ý¿â£¬ÖÐÎÄÕý³£¡£±ðµÄ³ÌÐò²éѯÊý¾Ý¿â£¬²¢ÏÔʾÓÚEDIT¿Ø¼þÖУ¬Õý³£¡£µ«ÊÇʹÓÃlist control ¿Ø¼ ......