On 2013.02.19 5:15 AM, mikkelzuuu wrote:
1-2-2013 16:58|H00002|NL-Radio 2|2013-01-03T00:00:00.0000000Z|172806528
An example of the output that I have to do. I see the 16 s on the first cell
and the time, but I wouldn't know why its giving me an error there. Would I
have to change the setup of the Cell in my SQLite Database?
Your problem is that you are stitching together a line of programming code in
the SQL language, and your data values are generally strings, but you are not
quoting those strings.
The minimal change you want to make is:
string StrQuery = @"INSERT INTO Test VALUES ("' +
dataGridView1.Rows[i].Cells["Column1"].Value + "', '" +
dataGridView1.Rows[i].Cells["Column2"].Value + "', '" +
dataGridView1.Rows[i].Cells["Column3"].Value + "', '" +
dataGridView1.Rows[i].Cells["Column4"].Value + "', '" +
dataGridView1.Rows[i].Cells["Column5"].Value + "');";
-- Darren Duncan
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users