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

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
AKRRKA
Posts: 198
Joined: Thu 26 Jan 2012 15:07
Location: Russia
Contact:

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

Post by AKRRKA » Thu 07 Jun 2018 16:33

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.


AKRRKA
Posts: 198
Joined: Thu 26 Jan 2012 15:07
Location: Russia
Contact:

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

Post by AKRRKA » Sat 09 Jun 2018 12:07

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.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

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

Post by Shalex » Wed 13 Jun 2018 10:41

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.

AKRRKA
Posts: 198
Joined: Thu 26 Jan 2012 15:07
Location: Russia
Contact:

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

Post by AKRRKA » Wed 13 Jun 2018 11:06

Clearly, thanks.

Post Reply