The string is:
Expand|Select|Wrap|Line Numbers
- 2013-01-03T00:00:00.0000000Z
Expand|Select|Wrap|Line Numbers
- 03-01-2013
Expand|Select|Wrap|Line Numbers
- conn.Open();
- command.Connection = conn;
- command.CommandText = "insert into Test ([Date], [LogName], [Channel], [DateRecord], [SizeInBytes]) values" + "(@Date, @LogName, @Channel, @DateRecord, @SizeInBytes)";
- command.Parameters.Add("@Date", DbType.String);
- command.Parameters.Add("@LogName", DbType.String);
- command.Parameters.Add("@Channel", DbType.String);
- command.Parameters.Add("@DateRecord", DbType.DateTime);
- command.Parameters.Add("@SizeInBytes", DbType.Int64);
- foreach (DataGridViewRow row in dgvTable.Rows)
- {
- if (!row.IsNewRow)
- {
- command.Parameters["@Date"].Value = row.Cells[0].Value;
- command.Parameters["@LogName"].Value = row.Cells[1].Value;
- command.Parameters["@Channel"].Value = row.Cells[2].Value;
- command.Parameters["@DateRecord"].Value = row.Cells[3].Value;
- command.Parameters["@SizeInBytes"].Value = row.Cells[4].Value;
- command.ExecuteNonQuery();
- btnGetDB.Enabled = false;
- btnOpenLog.Enabled = false;
- txtFilterChannel.Enabled = false;
- txtFilterDate.Enabled = false;
- txtFilterLog.Enabled = false;
- Application.DoEvents();
- }
- command.CommandType = CommandType.Text;
- }
Any help would be appreciated.
Michael