> SQLiteConnectionStringBuilder connBuilder = new
> SQLiteConnectionStringBuilder();
We are setting these configs via the connection string in xml. This is same as
the above. The following is the connection string that we are using:
“data
source=/var/www/html/ChargerDatabase.db;DateTimeKind=Utc;Version=3;Pooling=True;Synchronous=Off;journal
mode=Memory;Busy Timeout=30000;Default Timeout=30”
> Try setting the value to 30000 and see if this fixes your problem.
“Busy Timeout” is set to 30000 as seen in the connection string.
“Default Timeout” has a units of seconds as per the library and is the timeout
used for each command. This value is set to 30 sec.
> How are you disposing of your SQLiteDataReader object after the reading is
> finished ?
This is the format that we are following while using the reader or using
ExecuteNonQuery.
using (SQLiteConnection connection = GetNewSQLiteConnection())
{
try
{
connection.Open();
using (SQLiteCommand command = new SQLiteCommand(query,
connection))
{
// For Read Op ---------
using (var reader = command.ExecuteReader())
{
// ….
reader.Close();
}
// ---------------------------
// For Write Op --------
result = command.ExecuteNonQuery();
// --------------------------
command.Reset();
}
}
catch(Exception ex)
{
// ….
}
finally
{
if (connection.State != ConnectionState.Closed)
{
connection.Close();
}
}
}
Rahul.
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users