*-- call a SPROC SQLEXEC(nSql, "EXEC sp_dboption 'northwind', 'select into/bulkcopy'") *-- query the result set. In this case, sqlResult only contains one record ?sqlResult.currentSetting && returns "ON" or "OFF" *-- the following SPROC returns info about the primary key ?SQLEXEC(nSql, "EXEC sp_pkeys 'order details'", "PKEYS") BROWSE && returns 2 rowsAnother way to return a value from a SPROC is to define an OUTPUT parameter in the SPROC and pass the parameter by reference:
lcRetVal = "" && initialize return value *-- create a stored procedure that uses an OUTPUT parameter SQLEXEC(nSql, "create procedure sp_test @cRetVal char(100) OUTPUT AS SELECT @cRetVal = 'This is a return value'") ?SQLEXEC(nSql, "EXEC sp_test ?@lcRetVal") ?lcRetValHTH