Çó¸ßÊÖÖ¸µã£¬Ò»¸öPDA³ÌÐò£¬sqliteÊý¾Ý¿âÁ¬½Ó²»ÉÏ£¬¼±
string ConStr="data source=C:\ceshi.db;verson=3;password=123456";
SQLiteConnection MyConnection = new SQLiteConnection(ConStr);
try
{
MyConnection.Open();
MessageBox.Show("OK");
using (SQLiteCommand SQLCom = new SQLiteCommand(MyConnection))
{
string strSQL = @"SELECT num from ceshi;";
SQLCom.CommandText = strSQL;
SQLiteDataReader SQLReader = SQLCom.ExecuteReader();
while (SQLReader.NextResult() != false)
{
this.label1.Text = SQLReader["num"].ToString();
}
}
MyConnection.Close();
}
catch (Exception err)
{
throw err;
}
·¾¶²»¶Ô°É¡£
string ConStr="data source=C:\ceshi.db;verson=3;password=123456";
PDAÉϲ»´æÔÚÀàËÆC£º\Õâ¶«¶«°É¡£
Ïà¹ØÎÊ´ð£º
.netµÄ³ÌÐò£¬ÓõÄSystem.Data.SQLite DLL
¿âÊÇdb3µÄ£¬²éѯʱ×Ü˵no table **
·¾¶Ò²ÊǶԵÄ
¶øÄǸötableÊÇ´æÔÚµÄ
ÔÚPCÉÏÄÜ¿´µ½
ÇëÎÊÕâ¸öÊÇÔõô»ØÊÂÄØ£¿
ÊÖ»úÉÏÎļþʱûÓÐÏà¶Ô·¾¶µÄ¸ÅÄîµÄ£¬
±¨Ê²Ã ......
×îºÃÊDz»ÐèÒªÁíÍâ°²×°Çý¶¯»ò×é¼þµÄ·½Ê½¡£
ʹÓÃSQLiteµÄAPI, ËüÌṩÁËdll ÐÎʽµÄAPI
ÄѵÀCBÌṩµÄÊý¾Ý×é¼þ²»Ö§³Ö£¿
2010ÊÇÖ§³ÖµÄ¹Ø¼üÊÇÇý¶¯ÒªÑ¡¶Ô£¬ºÃÏñÊÇoffice 11ʲôµÄ
ÒýÓÃ
ÄѵÀCBÌṩµÄÊý¾Ý×é¼ ......
ÎÒÓÃsqliteadmin½¨ÁËÒ»¸öÊý¾Ý¿âtest.sdb,¿ÉÊÇÔõôҲ´ò²»¿ªÌáʾÈçÏ´íÎó£ºFile opened that is not a database file
file is encrypted or is not a database¡£
ÎÒµÄÁ¬½Ó×Ö·û´®ÈçÏÂÂ¥ÉϵĿɲ»¿ÉÒÔ°ïÎÒ¿´¿´
S ......
ÈçÏÂÓï¾ä £º
select TimeSpan from T_Table where onlineDate = '2009-12-2'
Êý¾Ý¿âÀïÃæÓзûºÏÌõ¼þµÄÖµµ«ÊDz鲻³öÀ´
Èç¹û¸Ä³ÉÈçÏ£º
select TimeSpan from T_Table where onlineDate = '200 ......
sqliteµÄ¿ÕÖµ²éѯÔõôд,ÄÜÕߵ÷Ö
select * from tt where f1 is null
select * from yourTable where col is null;
SQL code:
sqlite> create table Aoqun (id int primary key,col1 int);
sqlite> ......