Change Database Query Timeout




I have a query that I’m trying to execute. it takes about a minute to complete on average.

So when I attempt to use the Execute Query Command, it errors after 30 seconds.

.Net SqlClient Data Provider : Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

I read here that you can add an extra argument to the connection string, however - that did not seem to work.

My connection string currently looks like:

"Data Source=PRD-SQLBI-01\SQL2016DWH;Initial Catalog=OUTBOUNDprd_RPA;Integrated Security=True;Connect Timeout=90000"

Unsure what else I can do?

Command Timeout in Execute Query/Non Query activity

What solved the issue for me, when getting timeouts on the execution of the Query for the MySQL Connection, was increasing the default command timeout, by adding the following argument to the connection string:

;default command timeout=300


No good.

Main has thrown an exception
Message: Keyword not supported: 'default command timeout'.
Source: Connect
Exception Type: ArgumentException


Has anyone else any solutions, I really need to get this working.






Try this way


Hey vvaidya,

I wasn’t able to open your XAML.

Exception has been thrown by the target of an invocation.

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.InvalidOperationException: Cannot place windows in MDI since no MDI host (TabbedMdiHost, StandardMdiHost, etc.) was located as the direct child of the DockSite’s Workspace.
at ActiproSoftware.Windows.Controls.Docking.Logic.LayoutChangeProcessor.#58i(DockingWindow #sb, DockHost #d6i, DockingWindowState #Zb, Nullable1 #Fwf) at ActiproSoftware.Windows.Controls.Docking.Logic.LayoutChangeProcessor.#V8i(DockingWindow #sb, IDockTarget #F8i, Nullable1 #Zb, Nullable1 #Fwf, Int32 #G8i, Boolean #66i) at ActiproSoftware.Windows.Controls.Docking.Logic.LayoutChangeProcessor.Open(DockingWindow #sb) at ActiproSoftware.Windows.Controls.Docking.DockingWindow.Open() at UiPath.Workflow.DockSiteViewModelBehavior.OpenDockingWindow(DockingWindow dockingWindow) at UiPath.Workflow.DockSiteViewModelBehavior.OnDockSiteWindowRegistered(Object sender, DockingWindowEventArgs e) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Delegate.DynamicInvokeImpl(Object[] args) at System.Windows.RoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e) at ActiproSoftware.Windows.Controls.Docking.DockSite.RaiseWindowRegisteredEvent(DockingWindow window) at ActiproSoftware.Windows.Controls.Docking.DockSite.EnsureDockingWindowRegistered(DockingWindow window, Boolean wasContainerForItem) at ActiproSoftware.Windows.Controls.Docking.DockingWindow.set_DockSite(DockSite value) at ActiproSoftware.Windows.Controls.Docking.DockSite.AddContainers(IList1 containers, IList items, Int32 index, DockingWindowItemKind kind)
at ActiproSoftware.Windows.Controls.Docking.DockSite.OnDocumentItemsSourceCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection1.OnCollectionChanged(NotifyCollectionChangedEventArgs e) at Caliburn.Micro.BindableCollection1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection1.InsertItem(Int32 index, T item) at Caliburn.Micro.BindableCollection1.InsertItemBase(Int32 index, T item)
at Caliburn.Micro.BindableCollection1.<>c__DisplayClass8_0.<InsertItem>b__0() at Caliburn.Micro.XamlPlatformProvider.OnUIThread(Action action) at Caliburn.Micro.BindableCollection1.InsertItem(Int32 index, T item)
at System.Collections.ObjectModel.Collection`1.Add(T item)
at UiPath.Workflow.ViewModels.MainViewModel.AddDocument(IScreen document)
at UiPath.Workflow.ViewModels.MainViewModel.OpenWorkflowInProject(String workflowPath, Boolean recovered)


Did you modify anything or running as is? There is nothing fancy in my sample, not sure why it isn’t working. Version is 2016.2


Running as is.

Version: 2017.1.6302

I attempted to open it on my local machine and a work VM.

They both have the community edition installed currently


How would you get your code to work @vvaidya if you needed to write the sql results to a data table? I tried inserting an Execute Query activity in various spots into your code where it allows you to save the results into a data table but was not having success. I was successfully able to insert my query into your code and display the results in the write line but my sql query pulls a lot of columns with a lot of rows (hence why it is timing out. It takes about 90 seconds to execute).


This works, but seems to be only returning the first cell of every row.