Our application uses C#, .NET Framework 4.51 and SQL Server 2012.
Most of the the time, the following codes ran successfully, but randomly, it returns an error