Link to home
Start Free TrialLog in
Avatar of BdLm
BdLmFlag for Germany

asked on

MSSQL Server Timw Out with ZEOS and delphi

see attached screen dump, how to configure time out value with D7 and ZEOS 6.6.6  stable   :-)


split this question into two thread :

a)  do something on MSSQL server side
      https://www.experts-exchange.com/questions/26381585/time-out-value-MSSQL-server.html

b) solve topic using ZEOS
     this issue


EE-ZEOS-TIME-OUTV2.bmp
Avatar of 8080_Diver
8080_Diver
Flag of United States of America image

What component are you using to access the Zeos data?  Is it a TADO component?  What kind of connection are you establishing?
There are timeout settings at both the query component level and the connection level.  Unless you are setting both of those with the same value, the timeout will be the lowest of the settings.  For instance, if you set the query's timeout to 5 minutes but don't change the connection setting, your query will sutill time out in 30 seconds because that is the default for the connection.  Similarly, if you set the timeout on the connection to 5 minutes but don't change the query component's setting, your query will timeout in 30 seconds because that is also the default for the query component.
Finally, you may need to optimize your query and/or make sure you have the right indexes on the database on the ZEOS side.
Avatar of BdLm

ASKER

we use ZConnection component (  http://mseegernet.de/Delphi/ZEOS/ZEOS.htm )

we only see a time out setting option in the connection property of TZConnection, our TZQuery , TZStoredProcedure did not offer a time out value ...

where to set this value ?    
Are you working with SQL Server or with Firebird?  The link seems to talk a lot about interfacing with Firebird, is why I ask.
I am not at all familiar with the components you are using.  If the TZQuery and TZStoredProcedure do not offer a TimeOut (or CommandTimeOut) property, then they will be using a default, which is (once again) probably 30 seconds.  If you cannot change that setting then I would highly recommend using a different componet because, even though you can set the connection timeout, the default setting in the query or stored procedure component will be the controlling factor.
If it is surfaced to you by the components, you should be able to either find the Timeout property in the list of properties or find information about setting that property in the Help for the component.  If all else fails, you might want to contact the people who make those components and ask them how to set the timeout for the query/SP components.
If I remember correctly, Zeos is an IBM operating system.  In any case, no matter the source of the OS, you should be able to get an ADO driver from the vendor so that you can use TADO components.  The TADO components come with Delphi (reducing costs) and I know that they do have timeout settings for both the connection and the query/SP components.
Avatar of BdLm

ASKER

a) working with MSSQL server

b) ZEOS is not a OS,   ZEOS are database access components for delphi from D5.....D2010 (freeware)

The solution I need  is setting the timeout value for TZQuery, TZStoredProcedure and ......


ASKER CERTIFIED SOLUTION
Avatar of 8080_Diver
8080_Diver
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of BdLm

ASKER

a)  our code is now functional - no code change - , countermeasure more memory  now 8 GBYTE  and WIN 7 64 bit ........  bit out of mem has never been claimed to us  !!!!!!

b)  in the ZEOS connection string there are setting for the Time out parameter, ZEOS used ADO as protocol type


is the time setting for ADO also done via the conbnection string , send from the client to the database ???
In ADO, you should be able to set the timeout in the  connection string and in the query component.  Most components tend to have a default of 30 seconds, so it is not at all uncommon for someone to want to specify a different timeout period and to need to be able to do it to almost any component (because you never know which component is going to be used ;-).
 The additional memory helping with the problem would kind of make me nervous.  Unless you can get some (reasonable) explanation from the vendor, how can you know when the problem will revisit you? :-/
Avatar of BdLm

ASKER

can you posr a ADO connection string incl. time out value settings ?



our con string :

Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=gc_static;Data Source=SQLEXPRESS




zeos-1.jpg
Avatar of BdLm

ASKER

part #2 of ZEOS connection settings

zeos-2.jpg
Have you tried editing the General Timeout as well as the Connection Timeout?
That may be their mechanism for handling the query/SP timeout vs the connection timeout.
Avatar of BdLm

ASKER

made a grad B, we we did not check the ZEOS compenents options in detail, thanks for your comments