MrKim Well-Known Member Licensed User Longtime User Nov 7, 2017 #1 I have a delete statement I will run on a regular basis - multi user environment. I DON'T want to wait for it to finish. I tried running ExecNonQueryBatch with "" as the event and no event but it throws an error. So my question, does ExecNonQuery wait for the finish, or move on? This is going to SQL Server and I just want to send it and forget it. Thanks for your input.
I have a delete statement I will run on a regular basis - multi user environment. I DON'T want to wait for it to finish. I tried running ExecNonQueryBatch with "" as the event and no event but it throws an error. So my question, does ExecNonQuery wait for the finish, or move on? This is going to SQL Server and I just want to send it and forget it. Thanks for your input.
OliverA Expert Licensed User Longtime User Nov 7, 2017 #2 ExecNonQuery - Blocking ExecNonQueryBatch - Non-blocking/async Who says the event routine has to do anything? Code: Copy sql.AddNonQueryToBatch("DELETE FROM Temp WHERE id=?", Array As Object("1")) sql.ExecNonQueryBatch("SQL_DoNothing") ... Sub SQL_DoNothing_NonQueryComplete (Success As Boolean) 'Blank sub End Sub Upvote 0
ExecNonQuery - Blocking ExecNonQueryBatch - Non-blocking/async Who says the event routine has to do anything? Code: Copy sql.AddNonQueryToBatch("DELETE FROM Temp WHERE id=?", Array As Object("1")) sql.ExecNonQueryBatch("SQL_DoNothing") ... Sub SQL_DoNothing_NonQueryComplete (Success As Boolean) 'Blank sub End Sub
MrKim Well-Known Member Licensed User Longtime User Nov 7, 2017 #3 OliverA said: ExecNonQuery - Blocking ExecNonQueryBatch - Non-blocking/async Who says the event routine has to do anything? Code: Copy sql.AddNonQueryToBatch("DELETE FROM Temp WHERE id=?", Array As Object("1")) sql.ExecNonQueryBatch("SQL_DoNothing") ... Sub SQL_DoNothing_NonQueryComplete (Success As Boolean) 'Blank sub End Sub Click to expand... Yes it doesn't need to do anything but the code will eventually come back to it. I was hoping to just pass it to SQL Server and move on. Upvote 0
OliverA said: ExecNonQuery - Blocking ExecNonQueryBatch - Non-blocking/async Who says the event routine has to do anything? Code: Copy sql.AddNonQueryToBatch("DELETE FROM Temp WHERE id=?", Array As Object("1")) sql.ExecNonQueryBatch("SQL_DoNothing") ... Sub SQL_DoNothing_NonQueryComplete (Success As Boolean) 'Blank sub End Sub Click to expand... Yes it doesn't need to do anything but the code will eventually come back to it. I was hoping to just pass it to SQL Server and move on.
Erel B4X founder Staff member Licensed User Longtime User Nov 7, 2017 #4 MrKim said: es it doesn't need to do anything but the code will eventually come back to it. Click to expand... Nothing will happen if the sub is empty. Just ignore it. Upvote 0
MrKim said: es it doesn't need to do anything but the code will eventually come back to it. Click to expand... Nothing will happen if the sub is empty. Just ignore it.