Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 2nd, 2012  |  syntax: None  |  size: 0.40 KB  |  hits: 9  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. I get this SQL A transport-level error, but not all the time
  2. public static void QueryDB(string query)
  3.     {
  4.         cmd = new SqlCommand();
  5.         cmd.CommandText = query;
  6.         cmd.Connection = MyConn;
  7.         if (dr != null) dr.Dispose();
  8.         dr = cmd.ExecuteReader();
  9.     }
  10.        
  11. MyConn = new SqlConnection("Data Source=tcp:localhost; Database=EscalationManagementSystem; Integrated Security=true;");