sqlite-unity-plugin icon indicating copy to clipboard operation
sqlite-unity-plugin copied to clipboard

Unable to read database on x86 build.

Open Divyanshu-del opened this issue 5 years ago • 0 comments

I implemented your plugin in my unity game. I am using x86 build of my game. It shows error:
EntryPointNotFoundException: sqlite3_key

Mono.Data.Sqlite.SQLite3.SetPassword (System.Byte[] passwordBytes) (at <99f7d8f9a65b4d91ae5b1d55c424866f>:0) Mono.Data.Sqlite.SqliteConnection.Open () (at <99f7d8f9a65b4d91ae5b1d55c424866f>:0)

It works fine in x64 build but messes up in x86. Why is this issue happening? How do I fix it?

Here is an implementation of plugin in c#:

string connection = "URI=file:C:/files/serial.db;Version=3;Password=samplepassword";

                IDbConnection dbcon = new SqliteConnection(connection);
               
                dbcon.Open();
                IDbCommand cmnd_read = dbcon.CreateCommand();
                IDataReader reader;
                string query = "SELECT * FROM KeyId";
                cmnd_read.CommandText = query;
                reader = cmnd_read.ExecuteReader();
                while (reader.Read())
                {
                    Debug.Log (reader[0].ToString());
                    textfileData = reader[0].ToString();
                }
               
                dbcon.Close();

Divyanshu-del avatar Oct 27 '20 12:10 Divyanshu-del