I have developed a windows service to read data from a csv and write them back to the database.
After executing the program it will work fine until triggering an error after a few minutes when reached the below line
cmd.ExecuteNonQuery();
Screenshot of the error:
The data has been written to the database until this error pops up.
It will take up to 2-3 minutes to trigger the error.
I will include the related code chunk for this issue.
public void Insert()
{
if (this.OpenConnection() == true)
{
using(var reader = new StreamReader(@"C:\Users\Admin\source\Bargstedt.csv"))
{
List listA = new List();
while (!reader.EndOfStream)
{ </