string connectionstring = "server =SQLVS2\\SQLVS2;database=DDM;Persist Security Info=True;uid=ddmuser;password=User02+Ddm;";
SqlConnection myConnection = new SqlConnection(connectionstring);
SqlCommand myCommand = new SqlCommand("GetNullHash", myConnection);
myCommand.CommandType = CommandType.StoredProcedure;
myConnection.Open();
SqlDataReader rdr = myCommand.ExecuteReader();
while (rdr.Read())
{
string filename = @"\\" + rdr.GetString(3);
filename = System.IO.Path.Combine(filename, rdr.GetString(2));
filename = System.IO.Path.Combine(filename, rdr.GetString(1));
computeHashh1 abc = new computeHashh1();
Console.WriteLine(abc.computeHash(filename));
inserthash insert = new inserthash();
insert.InsertHash(rdr.GetString(1), abc.computeHash(filename), rdr.GetStr(2),rdr.GetString(3));
}
このループを 5 秒に 1 回、または停止するまで実行するにはどうすればよいですか。