Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pervasive Time Out Error 2

Status
Not open for further replies.

TomKane

Programmer
Jul 24, 2001
1,018
AU
Hi,

We're getting this problem and would be grateful for any advice that you might have. We have this .NET application that reads information from out Pervasive database but it's getting this error:

Thread Exception - ID is [Single] - Exception is ERROR [HYT00] [Pervasive][ODBC Client Interface][LNA][Pervasive][ODBC Engine Interface]S1T00Timeout expired.

Has anyone ever heard of this?

Thanks,
Tom
 
Sounds like the query is running longer than the timeout. Are you using ODBC, OLEDB, or the Pervasive Managed Provider from .NET?
Also, how long does the query take through the PCC? What version of Pervasive.SQL are you using?

Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
Custom VB and Btrieve development.
 
Mirtheil,

Thanks for your response. We're using the ADO .NET provider to get at the database.

Thanks again,
Tom
 
Also, how long does the query take through the PCC? What version of Pervasive.SQL are you using?
You can also use the PsqlConnection ConnectionTimeout property to increase (or eliminate the timeout by setting to 0). There's also the Pervasive KB PSQL 3973:
ID: psql3973
How to make Pervasive.SQL V8 engine ignore SQL_QUERY_TIMEOUT API

Problem Description:
Queries timeout due to support for the SQL_QUERY_TIMEOUT API in Pervasive.SQL V 8.
Applications working with Pervasive.SQL 2000 no longer work with Pervasive.SQL V8. Query Timeout error is due to support for SQL_QUERY_TIMEOUT API in V8.

ERROR [HYT00] [Pervasive][ODBC Client Interface][LNA][Pervasive][ODBC Engine
Interface]S1T00Timeout expired.
Problem Description:
ERROR [HYT00] [Pervasive][ODBC Client Interface][LNA][Pervasive][ODBC Engine
Interface]S1T00Timeout expired
How to make Pervasive.SQL V8 engine ignore SQL_QUERY_TIMEOUT API

Problem Environment:
Pervasive.SQL V8
SQL_QUERY_TIMEOUT
ADO
Defect: 44655

Cause of this problem:

Prior to Pervasive.SQL V8, query timeouts were not checked by the ODBC engine. If a query's processing time was too long, there was no way to stop the processing. ODBC standards provide a way to specify query timeout. If it is specified, the engine will stop processing any query that is taking more than the timeout value. The timeout is specified as a statement option.

The support for this ODBC feature started in Pervasive.SQL V8. Those who do not want any timeout in the application, do not need to do anything to their applications and run as they used to.

The problem happens with ADO applications with no query timeout setting. ADO has this feature to set the timeout by default to 30 seconds. So, if a user application did not set any timeout it was implicitly set to 30 seconds. This did not cause a problem before since it was ignored.


Solution:

The right solution to the problem is to rewrite the applications and set explicit timeouts for ADO applications (with "0" for no timeout or the correct timeout).

The another solution is to change the environment to make the Pervasive.SQL V8 engine to ignore the timeout setting. This is a "Datasource Name" setting, the setting is specific to a client DSN . Connections to different DSNs but to the same database or engine DSN may have different behavior.

The DSN entry is:
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\<dsn name>\
2. Under this entry, create a new string value named: QueryTimeOutAllowed
3. Set the value to NO to ignore any query timeouts. Set the value to YES to timeout.

If set to "YES", the engine enforces query timeouts for all connections to that DSN. If the setting is set to "NO", the engine ignores any query timeouts for connections to the given DSN.
The default behavior is as if the setting was set to "YES".

The fix itself includes: start passing the new setting from the client application to SRDE, if the setting was passed to the engine during the connection, any attempts to set query timeouts for the given connections are ignored. Client and server components of SRDE needs to be updated to make the fix work.
To get fixes for the ADO problem install the ODBC Client HotFix and the SRDE Hotfix which can be download from


Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
Custom VB and Btrieve development.
 
Thanks a million for that - excellent as always!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top