public void UpdateMogData(int frame, float[] mog, bool isRight)
{
try
{
SQLiteCommand updateCommand = new SQLiteCommand(connection);
string updateFrame;
if (isRight)
{
updateFrame =
@"UPDATE Framedata SET mogRight = @mog
where index_id = @frame";
}
else
{
updateFrame =
@"UPDATE Framedata SET mogLeft = @mog
where index_id = @frame";
}
updateCommand.CommandText = updateFrame;
updateCommand.Parameters.AddWithValue("@frame", frame);
updateCommand.Parameters.Add("@mog", DbType.Binary, mog.Length*sizeof(float)).Value = mog.ToByteArray();
updateCommand.ExecuteNonQuery();
}
catch (Exception e)
{
throw;
}
}