I have defined the following xbasic function, called by a button on a UX:
In the OnAjaxCallback Client side event I have the following code:
In the AfterAjaxCallbackComplete Client Side event I have this code:
This works fine when I restrict the number of records in the update. However, when I attempt to include all of the records in the update (about 12,000), the MYSQL query completes, as shown by using the Query in MYSQL:
but the "Updating Product Data" message box never closes, and the Alert message never displays.
Does anyone know what the problem may be?
Code:
function updateprices as c (e as p) dim number_updated as n Dim cn as sql::connection flag = cn.open("::Name::urbangrocery") dim sqlCommand as c sqlCommand = <<%str% update hgdelivery.products pr join hgdelivery.daily_data dd on substring(pr.upc,1,11) = substring(dd.upc,3,11) set pr.nprice = dd.price, pr.sale_price = dd.sale_price, pr.price_updated = CURDATE(), pr.sale_begin_date = dd.start_sale, pr.sale_end_date = dd.end_sale; %str% flag = cn.execute(sqlCommand) sqlCommand = "select ROW_COUNT()" flag = cn.execute(sqlCommand) dim rs2 as sql::ResultSet rs2 = cn.ResultSet number_updated = rs2.data(1) if flag =.t. updateprices = "alert('Number of records updated: " + js_escape(number_updated) + "');" else updateprices = "alert('Operation failed to complete');" end if cn.Close() end function
Code:
A5.msgBox.show('Updating Product Data','<div style=\'padding: 20px;\'><img src=\'CSS/A5System/Images/wait.gif\' />Please Wait - Updating Records...</div>','none',function() {});
Code:
A5.msgBox.hide();
Code:
select * from information_schema.processlist
Does anyone know what the problem may be?
Comment