Hola.
Mira la ayuda de SQLEXEC(nStatementHandle [, cSQLCommand [, cCursorName[, aCountInfo]]])
En aCountInfo tiene información de los registros afectado.
En lo personal sería mejor hacer un SP, como dice Miguel, cada SGDB tienes sus propias variables que indican la cantidad de registros afectados, por el último comando.
Tengo algo parecido en Sql Server:
ALTER PROCEDURE [dbo].[MTYSec] @tiYear int, @tiIdMovTip int, @iKeyNext INT OUTPUT AS
SET NOCOUNT ON
UPDATE MTYSec SET @iKeyNext = iSecuencia =iSecuencia + 1 Where iYear = @tiYear And iIdMovTip = @tiIdMovTip
IF @@ROWCOUNT = 0
Begin
Insert Into MTYSec (iYear, iIdMovTip, cDescripcion, iSecuencia) Values(@tiYear, @tiIdMovTip, 'Automatico x Años', 1)
Set @iKeyNext = 1
end
Saludos.
Mauricio