|
Post by notani on Mar 12, 2022 15:16:52 GMT
about dbManager
An error occurs in the line written as "dbManager.Execute(sql)" in the following description. The content of the error is NullReferenceException.
The version of Unity Editor I'm using is "2021.2.10f1 Personal". Perdon me.Please,please help me.
NullReferenceException: Object reference not set to an instance of an object
============================
using SimpleSQL;
//omit//
public SimpleSQL.SimpleSQLManager dbManager;
//omit//
private void CreateLevelHistory()
{
string sql = "CREATE TABLE level_history (" +
"_id INTEGER PRIMARY KEY AUTOINCREMENT," +
"level_id TEXT," +
"date_time TEXT," +
"correct_rate REAL," +
"border_rate REAL" +
");";
if (dbManager == null)
{
Debug.Log("dbManager is null");
}
else
{
Debug.Log("GetType()=" + dbManager.GetType());
}
Debug.Log("sql=" + sql);
dbManager.Execute(sql);
}
|
|
|
Post by echo17 on Mar 13, 2022 11:22:01 GMT
Sounds like you might be missing tables, fields, or other data in your database. I would need to see your project to give you a better diagnosis. Please see this FAQ: link
|
|