I cannot open my db

  • Nobody/Anonymous


    I'm trying to open the SQLite3 Database from the application XboxMediaCenter, but when i call Open() i have a "System.NullReferenceException" from " sqlite.net.dll"!

    My code is very simple:
    SQLiteConnection sql = new SQLiteConnection("Data Source=C:\\MyVideos31.db;Version=3");

    I can open the database with SQLiteSpy for example!

    Can somebody help me?

    Thank you.

    • Nobody/Anonymous

      I make some tries, and i put the SQLite.NET project in my own project to try to find the bug!

      In debug mode i found where is the error :

      >sqlite.net.dll!Finisar.SQLite.sqlite3.exec(string sql = "pragma synchronous = Normal") Line 630

      >sqlite.net.dll!Finisar.SQLite.SQLiteConnection.Open() Lie 337

      At this line :
      sqlite3_exec(DB,m.GetSQLiteStr(),IntPtr.Zero,IntPtr.Zero,out errmsg);

      Please help me!

    • Nobody/Anonymous

      Just a wild shot in the dark: try adding UTF16Encoding=True

      if that doesn't do it, CREATE it with this adapter first and then connect.

      When you touch stuff with anything other than this adapter it seems like the adapter goes crazy :)

      Use New=True to create a new database.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks