This is how I do it:

          Get SQLConnectionId of ghoConnection "YOURDATABASE" to hoConnection
          If (hoConnection = 0) Begin
             Send End_Status
             Send Stop_Box "Cannot Open Connection!"
          Else Begin
             Get SQLOpen of hoConnection to hoStmt 

             Move (SFormat("EXEC DELETEBBATCHBYCYCLE '%1'", sCycle)) to sQuery

             Send SQLExecDirect of hoStmt sQuery
             Send SQLClose of hoStmt
          Send SQLDisconnect of hoConnection
You could also create a global procedure in the application that has all this code in it and set a parameter to pass the sQuery string to it and then all you need to do each time is format the sQuery string.