1

I am trying to set command timeout for enterprise library 4.1 data access. I used below code for get command object from Database.

Dim dbCom as System.Data.Common.DBCommand
dbCom = dbCon.GetDatabase.GetStoredProcCommand(sprocName, parameters)
dbCom.CommandTimeOut 'I dont find this property.

How to set CommandTimeout?

James123
  • 11,184
  • 66
  • 189
  • 343

2 Answers2

1

In the code that you posted command timeout is written as:

dbCom.CommandTimeOut

But it should be:

dbCom.CommandTimeout

If that does not help, you could set the timeout on the connection

Open Microsoft.practices.EnterpriseLibrary database with just a connection string

Community
  • 1
  • 1
Shiraz Bhaiji
  • 64,065
  • 34
  • 143
  • 252
1

Check out this

Sql CommandTimeout set for EnterpriseLibrary

Enterprise Library 5.0 and Command Timeout

Community
  • 1
  • 1
Deepesh
  • 5,346
  • 6
  • 30
  • 45