Can you add commandTimeout to ExecuteRows?

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
anv047
User
Posts: 1

Can you add commandTimeout to ExecuteRows?

Post by anv047 »

my code below fails because sql execution time is more than default time (30sec). Can I add code for sql to take more time for execution? it works fine if execution time is less. I want to give more time for stored procedure to run so I can display all data it pulls. Thanks in advance for any advice.

var dr = ExecuteRows("exec [dbo].[GetStaffDoc] '" + param1 + "', '"+ param2+"'", "DB");


MichaelG
User
Posts: 1110

Post by MichaelG »

You can try:

var rows = GetConnection2("DB").DbConn2.Query("exec [dbo].[GetStaffDoc] '" + param1 + "', '" + param2 + "'", commandTimeout: 60).Select(row => (Dictionary<string, object>)ConvertToDictionary<object>(row)).ToList();


Post Reply