Available memory for program use is over 60MB so i would guess that's not the problem. I'm not using lots of libraries. I tried the code you gave and put it in the first possible place (main) and this is the detailed error message it gave me. This is before the first form is loaded. Memory consumption raised almost 1MB.
System.MissingMethodException was unhandled
Message="Can't find an Entry Point 'sqlite3_open_interop' in a PInvoke DLL 'System.Data.SQLite.DLL'."
StackTrace:
at System.Data.SQLite.SQLite3.Open()
at System.Data.SQLite.SQLiteConnection.Open()
at MyProject.Program.Main()
Other errors found while this happens are:
Changes 'cnn._sql.Changes' threw an exception of type 'System.NullReferenceException' int {System.NullReferenceException}
Version 'cnn._sql.Version' threw an exception of type 'System.MissingMethodException' string {System.MissingMethodException}
- base {"Can't find an Entry Point 'sqlite3_libversion' in a PInvoke DLL 'System.Data.SQLite.DLL'."} System.MissingMemberException {System.MissingMethodException}
- ServerVersion 'cnn.ServerVersion' threw an exception of type 'System.InvalidOperationException' string {System.InvalidOperationException}