Read “Set the QueryTimeout Value for ODBC Connections” at https://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B153756.