Re: New Era Prblemette
Posted in 1998
Jamie Nash wrote: > > Is there an equivilent in New Era to SQL INTERRUPT ON? > So, as soon as an sql statement is executed, if I feel as though its going > on for too long I can stop it part way? > Would I be able to create a button that the user can click, to interrupt a > select??? > > Any advice welcome > > Jamie When our user starts an extract, we set the following, which allows an SQL statement to be cancelled, and also display a 'stop' button they can click. CALL ixSQLConnect::getImplicitConnection().setCancelMode (ixSQLConnect::cancelOn) CALL win.stopExtractBT.show() When the user clicks the stop button, we execute the following and the extract stops. LET win.mainentryST.maxRows = win.mainentryST.getNumStoredRows() Note: in NewEra 3.1 we had to add an extra line in the RowRetrieved handler to check if it was actually at the maxRows so it would skip some extra processing we did when a row was retrieved -- didn't always do it cleanly, but basically seems to work okay. Glad to send you more detail if you need it. Pat