The environments I'm using are: .NET (2.0) and SQL Server 2005.
The scenario: in a .NET form the user gets prompted for two variables that will be provided to a stored procedure in SQL Server. Once the records are returned from the stored procedure, the .NET app will import these records to a .csv
file.
The trick here is that the stored procedure is dynamic. The records returned are not always the same columns or populating the same temp table. The .NET app works when the stored procedure runs in less than 30 secs.
I have increase my conn.CommandTimeout = 6000
in my app and I have increase the "remote query connection" in SQL Server to 6000 as well but it's still failing for those variables running longer then 30 secs.
Any suggestions is greatly appreciated.
Thanks Chaydee
This could be because you are setting the command timeout on the connection instead of the command object itself. Can't see your code but if you are using a DataReader, DataAdapter etc. try setting CommandTimeout on those objects. A few other possibilities:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.