I have some software that regularly hits a database to check for items to process. Items are added to the database at semi-regular intervals. My issue is that sometimes the inserts/updates into the database take an extraordinary time.
To test this, I created a new program with a simple database:
public static void Setup()
{
try
{
string conString = "Data Source=(localdb)\\v11.0;Integrated Security=True";
// Open the connection using the connection string.
using (SqlConnection con = new SqlConnection(conString))
{
con.Open();
SqlCommand com = new SqlCommand();
com.Connection = con;
com.CommandText = string.Format("Create Database Test15");
com.ExecuteNonQuery();
com.Command ...
Go to the complete details ...