I've inherited a SSIS package that has a c# script task that reads failed logins from our SQL Server error logs and reports on them. It's recently started timing out on one of our servers and I want to increase the timeout from the default 30. Right now I've got
try
{
string readFromConnection = "Data Source=" + (string)Dts.Variables["OneServer"].Value + ";Provider=SQLNCLI10.1;Integrated Security=SSPI;Auto Translate=False;Application Name=SSIS-Package;";
ArrayList results = null;
try
{
results = ExecuteQuery("EXEC sys.xp_readerrorlog 0,1, N'Login failed for user'", readFromConnection);
}
How do I add a CommandTimeout into this? Or is there a better way to do it?