-
-
Robert implemented a managed ADO.NET provider, but not a native Ole DB provider. So, if you want to use Robert's System.Data.SQLite, you need to rewrite your application, you need to replace all OleDbConnection, OleDbCommand, OleDbDataAdapter, etc. with SQLiteConnection, SQLiteCommand, SQLiteDataAdapter, etc. This is because you are ...
-
I believe it is a bug in the documentation:
http://sqlite.phxsoftware.com/forums/p/1161/5766.aspx#5766
-
In SQLite 3.6.5, MEMORY option was added to the journal_mode pragma , however SQLiteJournalModeEnum has no Memory option.
Please, add Add Memory option to SQLiteJournalModeEnum.
Thanks.
-
Yes, there is one: public static DataTable GetColumns(SQLiteConnection cn)
{
using (SQLiteCommand tablesCmd = new SQLiteCommand("select name from sqlite_master where type='table' or type='view'", cn))
{
DataTable columnsDataTable = new DataTable();
...
-
You need to format datetime in ISO format. Example:
datetime('2009-08-19 12:44:25').
Anyway, I would suggest you to use parameterized insert commands instead. In this way you don't have to deal with formatting numbers, dates or guids. Furthermore, you will have better performance and your application will be less vulnerable ...
-
It sounds like there are many rows with IdStop > 500 and there is not good index to solve the query, so SQLite has to scan the entire table and check if the condition IdStop <= 500 is met. I guess the scan order is similar to IdStop order, therefore after IdStop = 500 is reached, a lot of rows remain to be scanned but none of them meet ...
-
I don't see anything in your code that locks the database in exclusive mode. The code you have posted just read the database. So, I guess the problem is somewhere else. Please, could you post the complete code?
Anyway, here you have some basic guidelines:
Be sure you dispose all disposable objects (connections, transactions, ...
-
SQLiteCommands are not thread safe, but I don't see any problem with your code as long as you use command clones.
-
Regarding your schema design, IMHO I would say that it is not very appropriate to have one table per each posible number of inputs.If column1 and column2, etc, all mean the same thing, it would be more appropriate to have only one table with just PK and Value columns, and perhaps some additional meaning column such as date or something like that. ...