So I am using the System.Data.SQLite library, to store some data locally on my pc, from a database. The problem is though there are two column entrys, which are GUID (unique ID's which are defined as the following: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). And the compiler always throws an error, when he comes to the first "-" char. I know that DATE uses YYYY-MM-DD syntax e.g. can it be, that this collides in some way?
Here is the code row:
sqlString = $"insert into completelocalmessages (Date, Sender, Message, Receiver, ID) values({message.Date.Year}-{message.Date.Month}-{message.Date.Day}, {message.From.ToString()}, {message.Message}, {message.To.ToString()}, {message.ID})";
The Date is of type Date, Sender and receiver are the GUID's, Message is a string and ID is an integer. The table is defined like this:
sqlString = "create table completelocalmessages (Date date, Sender Text(30), Message Text(400), Receiver Text(30), ID int)";