'How to store c# decimal data type in an sqlite3 database?

I'm trying to store an c# datatype in a sqlite3 table and it gives an error.

                    "id INTEGER NOT NULL PRIMARY KEY, " +
                    "time DATETIME, " +
                    "total DECIMAL)

When trying to insert a value

            string Sql = "INSERT INTO " + TableName + " (symbolId, time, total)"
            + string.Format("VALUES (@{0},@{1},@{2})",
                    (int)symbolId, time, total);
            SqliteCommand command = new SqliteCommand(Sql, Connection);
            command.ExecuteNonQuery();

When executing the query the error is the following:

enter image description here

What is the correct approach? Use text type instead?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source