Page 1 of 1

LinqConnect Professional Version 4.8.1398 (11-Jan-2018) - need CommandTimeout for MS SQL

Posted: Thu 07 Jun 2018 16:33
by AKRRKA
LinqConnect Professional Version 4.8.1398 (11-Jan-2018) - need CommandTimeout for MS SQL

I have one big LINQ request. It works on some PCs very long time.

1) MS SQL performs this command about 45 seconds.
2) But by default, CommandTimeout is 30 seconds, and it does not support in the Devart component.
3) In the connection string, it is not possible to configure a larger timeout.

On this problem, there is a discussion of the link: https://stackoverflow.com/questions/184 ... ql-command

It is very necessary to configure the CommandTimeout.
Please add this option.
This is critical in some cases.

Re: LinqConnect Professional Version 4.8.1398 (11-Jan-2018) - need CommandTimeout for MS SQL

Posted: Fri 08 Jun 2018 15:24
by Shalex
Please set DataContext.CommandTimeout: https://www.devart.com/linqconnect/docs ... meout.html.

Re: LinqConnect Professional Version 4.8.1398 (11-Jan-2018) - need CommandTimeout for MS SQL

Posted: Sat 09 Jun 2018 12:07
by AKRRKA
Thank you very much.

I expected this parameter in the form of connection and as a consequence in the connection string, similar to MySQL and PostgreSQL, Oracle.
Only SQL Server does not have it (SQLite does not take into account).

I have an application that works with different DBMS using one model, and I was forced to allow the user to operate with timeouts, because on some servers, for no apparent reason, heavy requests are not processed much longer than the timeout for the default command.

So for all DBMS types there is a connection string with parameters, for MySQL and PostgreSQL, there is "default command timeout" and for MS SQL Server there is not, although it turns out and for him it can be used, so it would be very good to use parameter similar it worked. That all was on one algorithm, and the more so that the parameter "connect timeout" he has.

An example from my:
SQL Server = integrated security = True; persist security info = False; Pooling = False; connect timeout = 30

MySQL = user id = user; password = ***********; host = 10.1.1.55; database = testdb; unicode = True; persist security info = False; Pooling = False; connection timeout = 15; default command timeout = 90; found rows = True

PostgreSQL = persist security info = True; unicode = True; connection timeout = 15; default command timeout = 90; schema = public

Now of course can try to make the condition for SQL Server to take out of the line "default command timeout = 90", after it install it separately through DataContext.CommandTimeout, but as it is not beautiful and it will be crooked.
Therefore, if it's not difficult (at first glance, I do not see anything like that), a big request to add this parameter to the connection form (connection string) for SQL Server, it would be very convenient and logical.

Thanks again.

Re: LinqConnect Professional Version 4.8.1398 (11-Jan-2018) - need CommandTimeout for MS SQL

Posted: Wed 13 Jun 2018 10:41
by Shalex
LinqConnect talks to SQL Server via Microsoft .NET Framework data provider for SQL Server (System.Data.SqlClient). This provider doesn't include the Default Command Timeout parameter. It was implemented in the Devart providers used by LinqConnect in case of MySQL and PostgreSQL.

Re: LinqConnect Professional Version 4.8.1398 (11-Jan-2018) - need CommandTimeout for MS SQL

Posted: Wed 13 Jun 2018 11:06
by AKRRKA
Clearly, thanks.