Asp.net中使用Sqlite數(shù)據(jù)庫的方法
string datasource = "d:\\test.db"; //數(shù)據(jù)庫文件的地址
System.Data.SQLite.SQLiteConnection.CreateFile(datasource); //產(chǎn)生文件
這樣產(chǎn)生出的test.db就可以在asp.net中運用了,此時你即使用SqliteAdmin以及SQLite Expert Professional 2軟件打開它在里面建表都不影響它的使用了。
對Sqlite的操作其實跟Access非常像的,只不過OleDB開頭的都變成了SQLite而已…
.NET Framework Data Provider for ODBC
DRIVER=SQLite3 ODBC Driver; Database=mydb.db; LongNames=0; Timeout=1000; NoTXN=0;SyncPragma=NORMAL; StepAPI=0;
This is just one connection string sample for the wrapping OdbcConnection class that calls the underlying ODBC Driver. See respective ODBC driver for more connection strings to use with this class.
SQLite3 ODBC Driver
DRIVER=SQLite3 ODBC Driver; Database=mydb.db; LongNames=0; Timeout=1000; NoTXN=0;SyncPragma=NORMAL; StepAPI=0;
SQLite.NET
The default value is ISO8601 which activates the use of the ISO8601 datetime format
如果把Guid作為文本存儲需要更多的存儲空間
Data Source=filename;Version=3;Cache Size=2000;
Cache Size 單位是字節(jié)
Page Size 單位是字節(jié)
Data Source=filename;Version=3;FailIfMissing=True;
默認情況下,如果數(shù)據(jù)庫文件不存在,會自動創(chuàng)建一個新的,使用這個參數(shù),將不會創(chuàng)建,而是拋出異常信息
Disable the Journal File (禁用日志回滾)
This one disables the rollback journal entirely.
This one blanks and leaves the journal file on disk after a commit. Default behaviour is to delete the Journal File after each commit.
相關文章
Asp.net實時顯示文本框字數(shù)實現(xiàn)代碼
實時顯示文本框字數(shù)在日常開發(fā)中很常見,也很實用,接下來為大家介紹下如何實現(xiàn)實時顯示,感興趣的朋友可以參考下哈,希望可以幫助到你2013-04-04
完美兼容ie和firefox的asp.net網(wǎng)站加入收藏和設置主頁
這篇文章主要介紹了完美兼容ie和firefox的asp.net網(wǎng)站加入收藏和設置主頁,需要的朋友可以參考下2014-12-12
asp.net treeview checkbox 相關問題
asp.net treeview checkbox 相關問題,需要的朋友可以看下。2009-06-06
Visual Stduio 2010開發(fā)環(huán)境搭建教程
這篇文章主要為大家詳細介紹了Visual Stduio 2010開發(fā)環(huán)境搭建教程,具有一定的參考價值,感興趣的小伙伴們可以參考一下2017-04-04

