Hello:

I just found out that if I exit a While loop while retrieving a long database query (MySQL to be specific), even after the "Finish" message appears, the data is still coming.

I have a query which returns about 80.000 results, and if the user aborts by pressing "cancel", it still needs to wait for the rest of the results to be downloaded. Not even executing a DB.Close

At the end, the network still shows activity of data being downloaded, and the query is still in the process list of MySQL.


Any way to stop the query?

  if DB.Connect then

    RS = DB.SQLSelect(sqlcmd)

    while not RS.EOF

  // Do something with the database

      if CancelButtonPressed = true then
        exit
      end if

      RS.MoveNext

    wend

  end if

  // Close the DB so no more results are downloaded
  DB.Close
  MsgBox "Finish"

// At this point the network still shows activity of data being downloaded,
  // and the query is still



Thanks


Giuseppe Farese

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to