¹ØÓÚ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 ......
string ConStr="data source=C:\ceshi.db;verson=3;password=123456";
SQLiteConnection MyConnection = new SQLiteConnection(ConStr);
try
{ ......
sqlite ÖÐ
CREATE TABLE table1 (
id integer primary key autoincrement,
name text default '',
[index] integer default ROWID
)
ÓÐûÓÐÀàËÆµÄ¹¦ÄÜ£¬Èà index µÄֵĬÈϵÈÓÚid£¬ ......
ÓÃevc±àдӦÓóÌÐò£¬¿ª·¢Êý¾Ý¿â¹ÜÀíϵͳ¡£ÉèÖÃencodingΪUTF-8£¬Äܹ»²åÈëÖÐÎÄÊý¾Ý£¬ÓÃSQLite Expert Personal¿´Êý¾Ý¿â£¬ÖÐÎÄÕý³£¡£±ðµÄ³ÌÐò²éѯÊý¾Ý¿â£¬²¢ÏÔʾÓÚEDIT¿Ø¼þÖУ¬Õý³£¡£µ«ÊÇʹÓÃlist control ¿Ø¼ ......