存储过程定义如下:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE sp_InsertRequisition
 @ID bigint output,
 @ProposerID int,
 @Available bit,
 @Priority varchar(10),
 @Stage varchar(50)
AS
BEGIN
 SET NOCOUNT ON;
 INSERT INTO [Procurment].[dbo].[Requisition]
      ([ProposerID]
      ,[Available]
      ,[Stage]
      ,[Priority])
      VALUES
      (@ProposerID,@Available,@Stage,@Priority)
 SELECT @ID = IDENT_CURRENT('Requisition')
END
GO

配置文件定义如下:
<?xml version="1.0" encoding="UTF-8" ?>
<sqlMap namespace="Requisition"
xmlns="http://ibatis.apache.org/mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
  <statements>
    <insert + ex.Message, ex);
            }
        }

相关文章: