· 7 years ago · Jan 21, 2019, 06:48 PM
1private IDbConnection connection;
2private IDbCommand command;
3private IDataReader reader;
4
5// Start is called before the first frame update
6void Start()
7{
8 Connection();
9}
10
11private void Connection()
12{
13 string dbFile = "URI=File:"+ Application.dataPath +"/Plugins/TrilhoVerde.s3db:";
14 connection = (IDbConnection) new SqliteConnection(dbFile);
15 connection.Open();
16
17 command = connection.CreateCommand();
18
19 string createTable = "CREATE TABLE IF NOT EXISTS Avatar (idAvatar INTEGER NOT NULL AUTOINCREMENT,avatar BLOB NOT NULL,PRIMARY KEY(idAvatar));";
20 command.CommandText = createTable;
21 command.ExecuteNonQuery();
22} ...