>** sp_insert >PARAMETERS value >SET NULL OFF >INSERT INTO table1 (field1) VALUES (m.value) >CREATE CURSOR result (result i) >INSERT INTO result VALUES (GetAutoincValue()) >RETURN SETRESULTSET("result") >AFAIK you don't need it as a resultset and may return it as an output parameter. Should work the same, I think.