Query Timeout Expired

I was getting “Query timeout expired” errors in the code for doing an import from a back-end ERP into SalesLogix.

So I logged into the database server, right-clicked on the connection, Properties, and then opened the Connections items on the Server Properties form, and changed the Remote query timeout from its default of 600 seconds to 0, to disable that.

Re-ran the code … but it was still giving the same (unpredictable, intermittent) error.

Turns out that the objConn in code has a CommandTimeout property, too … which defaults to 30 seconds. So if you set objConn.CommandTimeout = 0 (or just to a really high number), you can disable that, too.

Those timeouts are of course affected by the speed of the server, so they wouldn’t be occurring on a faster machine.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: