>CREATE DEFINER=`root`@`%` FUNCTION `NumRecs`() RETURNS int(11) > SQL SECURITY INVOKER > COMMENT 'Prueba de Stored Procedure' >BEGIN > Declare nRecs Int; > Select Count(*) Into nRecs From NCH; > Return nRecs; >END > >And in the VFP .prg: > >h=SQLConnect("Necropolis") >If h>0 > If SQLExec(h, "Call NumRecs();", "qRecs") < 0 > AError(x) > MessageBox( x[3] ) > EndIf > SQLDisconnect(h) >EndIf >