Post by miking on Jun 27, 2021 14:16:25 GMT
Hi,
I am having problems, setting SimpleSQL up for my own data bases. The Demos look neat and seem easy, but setting up everything on your own is bugging me out...
Since i was running into one issue after the other, i decided to do this approach:
1. in Unity: Tools --> SimpleSQL --> Create Empty Database --> Empty.bytes
2. in Unity: Rename DB to TarkovQuests.bytes
3. Opened TarkovQuests.bytes with DB Browser(SQLite)
4. Created a Table "TarkovMap":
5. Added some values to the table:
6. Followed your youtube intro: DBManager with TarkovQuests.bytes as DB File, Logic script is as follows:
7. Upon starting the app, i currently get the error:
SQLiteException: no such table: TarkovMap
The table should be there, when i reopen the DB in the 3rd Party DB Browser, all the data is still there
Do you have an idea what the issue could be here?
Also i was unsure, the ORM file need to be written by myself, is this correct? Or is there some kind of generator? Also what do I have to take into consideration for those files (Case sensitive etc...)
This is the file I created for this simple example (i just checked how it was done in the Weapon Class file):
Thanks in advance for your help, i am really pulling my hair, because i think it should be pretty simple to set this stuff up....
Best regards
Mike
I am having problems, setting SimpleSQL up for my own data bases. The Demos look neat and seem easy, but setting up everything on your own is bugging me out...
Since i was running into one issue after the other, i decided to do this approach:
1. in Unity: Tools --> SimpleSQL --> Create Empty Database --> Empty.bytes
2. in Unity: Rename DB to TarkovQuests.bytes
3. Opened TarkovQuests.bytes with DB Browser(SQLite)
4. Created a Table "TarkovMap":
5. Added some values to the table:
6. Followed your youtube intro: DBManager with TarkovQuests.bytes as DB File, Logic script is as follows:
public class Logic : MonoBehaviour
{
public Text output;
public SimpleSQLManager dbManager;
// Start is called before the first frame update
void Start()
{
var results = dbManager.Query<SimpleSQL.Demos.TarkovMap>("SELECT * FROM TarkovMap");
Debug.Log("No of entries: " + results.Count);
output.text = "";
foreach (var result in results)
{
output.text += "MapName: " + result.MapName + "MapID: " + result.MapId + "\n";
}
}
// Update is called once per frame
void Update()
{
}
}
7. Upon starting the app, i currently get the error:
SQLiteException: no such table: TarkovMap
The table should be there, when i reopen the DB in the 3rd Party DB Browser, all the data is still there
Do you have an idea what the issue could be here?
Also i was unsure, the ORM file need to be written by myself, is this correct? Or is there some kind of generator? Also what do I have to take into consideration for those files (Case sensitive etc...)
This is the file I created for this simple example (i just checked how it was done in the Weapon Class file):
namespace SimpleSQL.Demos
{
using SimpleSQL;
public class TarkovMap
{
//The MapId field is set as the primary key in the SQLite database,
// so we reflect that here with the PrimaryKey attribute
[PrimaryKey]
public int MapId { get; set; }
public string MapName { get; set; }
}
}
Thanks in advance for your help, i am really pulling my hair, because i think it should be pretty simple to set this stuff up....
Best regards
Mike