dbTalk Databases Forums  

Timeout problem in .NET

comp.databases.btrieve comp.databases.btrieve


Discuss Timeout problem in .NET in the comp.databases.btrieve forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
jecko68@gmail.com
 
Posts: n/a

Default Timeout problem in .NET - 11-21-2007 , 12:48 AM






Greetings,
We have developed an ASP .NET app using VS Studio 2005. The database
in our test environment is Pervasive 9.5, but the same problem has
occured in a Pervasive 9.1 environment. We are using ODBC to access
the data. A simplified example:

Dim oConnection As OdbcConnection = New OdbcConnection(GET CONNSTRING
HERE)
Dim oCommand As OdbcCommand = New OdbcCommand()
sSQL = "SELECT field1, field2, field3"
sSQL = sSQL & " FROM (table1"
sSQL = sSQL & " LEFT OUTER JOIN table2 ON field1 = w.cpersonnamelink)"
sSQL = sSQL & " WHERE field3 = " & somevalue
oCommand.CommandText = sSQL
oCommand.Connection = oConnection
oCommand.CommandType = Data.CommandType.Text
oConnection.Open()
Dim result As OdbcDataReader =
oCommand.ExecuteReader(CommandBehavior.CloseConnec tion)
While result.Read
....

The SQL selects aren't that complex but in both environments we
randomly get a timeout error:

[OdbcException (0x80131937): ERROR [HYT00] [Pervasive][ODBC Client
Interface][LNA][Pervasive][ODBC Engine Interface]S1T00Timeout
expired.]
[InvalidOperationException: The connection has been disabled.]
System.Data.Odbc.OdbcConnection.ConnectionIsAlive( Exception
innerException) +1191211

I can't figure out what's wrong. As I said, the SQL clauses are quite
straight forward so I can't get why
most times the SQL execution is done within a second ot 2, but now and
again I get this error.
Any good tips where to look?

regards, Joacim


Reply With Quote
  #2  
Old   
Joni Tuoreniemi
 
Posts: n/a

Default Re: Timeout problem in .NET - 11-22-2007 , 09:07 AM






Check out OdbcCommand.Timeout property.

<jecko68 (AT) gmail (DOT) com> wrote

Quote:
Greetings,
We have developed an ASP .NET app using VS Studio 2005. The database
in our test environment is Pervasive 9.5, but the same problem has
occured in a Pervasive 9.1 environment. We are using ODBC to access
the data. A simplified example:

Dim oConnection As OdbcConnection = New OdbcConnection(GET CONNSTRING
HERE)
Dim oCommand As OdbcCommand = New OdbcCommand()
sSQL = "SELECT field1, field2, field3"
sSQL = sSQL & " FROM (table1"
sSQL = sSQL & " LEFT OUTER JOIN table2 ON field1 = w.cpersonnamelink)"
sSQL = sSQL & " WHERE field3 = " & somevalue
oCommand.CommandText = sSQL
oCommand.Connection = oConnection
oCommand.CommandType = Data.CommandType.Text
oConnection.Open()
Dim result As OdbcDataReader =
oCommand.ExecuteReader(CommandBehavior.CloseConnec tion)
While result.Read
...

The SQL selects aren't that complex but in both environments we
randomly get a timeout error:

[OdbcException (0x80131937): ERROR [HYT00] [Pervasive][ODBC Client
Interface][LNA][Pervasive][ODBC Engine Interface]S1T00Timeout
expired.]
[InvalidOperationException: The connection has been disabled.]
System.Data.Odbc.OdbcConnection.ConnectionIsAlive( Exception
innerException) +1191211

I can't figure out what's wrong. As I said, the SQL clauses are quite
straight forward so I can't get why
most times the SQL execution is done within a second ot 2, but now and
again I get this error.
Any good tips where to look?

regards, Joacim




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.