Page 1 of 1

ExecuteScalar not working in RowDeleted

Posted: Wed Jan 04, 2023 1:27 pm
by emlim896

Hello,

I used ASP.NET Maker 2022. When using Executecalar() in RowDeleted got error "Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding."

But it worked in RowDeleting(), RowInserting(), RowInserted(), RowUpdating() and RowUpdated().

My code:

object _sum = ExecuteScalar("select sum(Quantity) from Orders_Items");

Appreciate for any help.

Thanks


Re: ExecuteScalar not working in RowDeleted

Posted: Thu Jan 05, 2023 7:01 am
by MichaelG

Try disabling UseTransaction for delete. In delete page Page_Load server event, add:

UseTransaction = false;


Re: ExecuteScalar not working in RowDeleted

Posted: Mon Jan 09, 2023 11:26 pm
by emlim896

Great, that works. Thank you!