MySQLoo - onSuccess is not being called

Hello out there,
i’ve got a small problem.

The following Code does work in general. The Data gets inserted into the Database. The Problem is, that the onsuccess is not being called.


function RegisterAchievment(Achievment,Title,Desc)
	local regach = Ach_DB:query("INSERT INTO `achievments` SET `name`='" .. Achievment .. "', `title`='" .. Title .. "', `desc`='" .. Desc .. "';");
	function regach:onSuccess()
		print('** Registred '.. Achievment .. string.rep( " ", 25 - Achievment:len() ) ..'**');
	end
	function regach:onError( err, sql )
		if Ach_DB:status() == mysqloo.DATABASE_NOT_CONNECTED then
			print('[Achievments] Lost connection to the Database!' )
			Ach_DB:connect()
			print('[Achievments] Reconnecting to Database...' )
			RegisterAchievment(Achievment,Title,Desc)
		else
			print(err)
		end
	end
	regach:start()
end

I also tried it like this:



	regach.onSuccess = function()
		print('** Registred '.. Achievment .. string.rep( " ", 25 - Achievment:len() ) ..'**');
	end


Can somebody help me with this problem?