views:

80

answers:

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?

A: 

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

http://stackoverflow.com/questions/401339/open-microsoft-practices-enterpriselibrary-database-with-just-a-connection-string

Shiraz Bhaiji