When getting the latest code from CVS I successfully build the Win32 version, but when ever a PRAGMA function is called it appears to determine if the DB is open and then throw this error. Unfortunately this is getting triggered from the SQLiteConnection.Open call, which then fails as we havn't officially opened the DB yet :-(.
defValue = FindKey(opts, "Legacy Format", Boolean.FalseString);
cmd.CommandText = String.Format(CultureInfo.InvariantCulture, "PRAGMA legacy_file_format={0}", SQLiteConvert.ToBoolean(defValue) == true ? "ON" : "OFF");
cmd.ExecuteNonQuery();
defValue = FindKey(opts, "Synchronous", "Normal");
if (String.Compare(defValue, "Full", StringComparison.OrdinalIgnoreCase) != 0)
{
cmd.CommandText = String.Format(CultureInfo.InvariantCulture, "PRAGMA synchronous={0}", defValue);
cmd.ExecuteNonQuery();
}
The default connection string causes the other tests to skip the attempts to ExecuteNonQuery, but both "Legacy Format" and "Synchronous" cause it to step throughSQLiteCommand:ExecuteNonQuery, SQLiteCommand:ExecuteReader, SQLiteCommand:InitializeForReader.
Any guidance would be appreciated,
Many thanks again,
Gareth