help!!.. I don't seem to find what error this is.. I tried surfing the web for answers but to no avail..
I already have the System.Data.dll, Mono.Data.Sqlite.dll, sqlite3.def and sqlite3.dll into Assets/Plugins
This is the error:
EntryPointNotFoundException: sqlite3_next_stmt
Mono.Data.Sqlite.SQLiteBase.ResetConnection (Mono.Data.Sqlite.SqliteConnectionHandle db)
Mono.Data.Sqlite.SQLiteBase.CloseConnection (Mono.Data.Sqlite.SqliteConnectionHandle db)
Mono.Data.Sqlite.SqliteConnectionHandle.ReleaseHandle ()
System.Runtime.InteropServices.CriticalHandle.Dispose (Boolean disposing) (at strong text/Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Runtime.InteropServices/CriticalHandle.cs:56)
System.Runtime.InteropServices.CriticalHandle.Dispose () (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Runtime.InteropServices/CriticalHandle.cs:42)
Mono.Data.Sqlite.SQLite3.Close ()
Mono.Data.Sqlite.SqliteConnection.Close ()
(wrapper remoting-invoke-with-check) Mono.Data.Sqlite.SqliteConnection:Close ()
Mono.Data.Sqlite.SqliteConnection.Open ()
SampleDB.Start () (at Assets/Scripts/SampleDB.cs:17)
My Program:
void Start () {
string conn = "URI=file:" + Application.dataPath + "/LandslidePredDB.s3db"; //Path to database.
IDbConnection dbconn;
dbconn = (IDbConnection) new SqliteConnection(conn);
dbconn.Open();
IDbCommand dbcmd = dbconn.CreateCommand();
string sqlQuery = "SELECT Rain_ID, Rain_Type, Rain_Desc " + "FROM Rain_DB";
dbcmd.CommandText = sqlQuery;
IDataReader reader = dbcmd.ExecuteReader();
while (reader.Read())
{
int value = reader.GetInt32(0);
string name = reader.GetString(1);
string rand = reader.GetString(2);
Debug.Log( "value= "+value+" name ="+name+" random ="+ rand );
}
reader.Close();
reader = null;
dbcmd.Dispose();
dbcmd = null;
dbconn.Close();
dbconn = null;
}
}
Aucun commentaire:
Enregistrer un commentaire