Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public byte[] GetStateDataSlow(long uid)
- {
- byte[] data = new byte[0];
- //try
- //{
- using (SQLiteConnection connect = new SQLiteConnection($"Data Source={_filePath}; Version=3;"))
- {
- string commandText = $"SELECT * FROM `states` WHERE uid = @uid";
- SQLiteCommand command = new SQLiteCommand(commandText, connect);
- command.Parameters.AddWithValue("@uid", uid);
- connect.Open();
- SQLiteDataReader reader = command.ExecuteReader();
- foreach (DbDataRecord record in reader)
- {
- data = (byte[])record["data"];
- }
- connect.Close();
- }
- //}
- //catch
- //{
- // Debug.LogError("ErrorParceDB");
- // return false;
- //}
- return data;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement