My Insert statement (defined through the use of a TableAdapter) obviously does not include the id column.  My question is what mechanism do I use to return the ID to the DataSet?

Use an output parameter with the TableAdapter InsertCommand in conjunction with an output parameter in a stored proc (or even in your passed sql statement). Your stored proc will look something like:

CREATE PROCEDURE REPORTGROUPBENCHMARKINSERT (
    FK_REPORTGROUPID INTEGER,
    FK_BENCHMARKID INTEGER)
RETURNS (
    ID INTEGER)
AS
begin
    ID = GEN_ID(GEN_REPORTGROUPBENCHMARK_ID,1);
    INSERT INTO REPORTGROUPBENCHMARK (REPORTGROUPBENCHMARKID, FK_REPORTGROUPID, FK_BENCHMARKID)
    VALUES (:ID, :FK_REPORTGROUPID, :FK_BENCHMARKID);
  suspend;
end

When the insert runs the ID will be returned through the parameters, and your dataset will be updated (just make sure that the parameter in .NET is correctly linked with the field.

Reply via email to