i have the following stored procedure which creates a new record everytime i click the save button:
USE [unileb]
GO
/****** Object: StoredProcedure [dbo].[BIB_InsertNewBiblio] Script Date: 06/04/2014 11:15:43 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[BIB_InsertNewBiblio]
@BiblioId int,
@BiblioTitle nvarchar(200),
@Writer nvarchar(200),
@BackData nvarchar(200),
@PlaceOfPub nvarchar(200),
@DateOfPub smalldatetime,
@Text_Summary nvarchar(200),
@URL nvarchar(200),
@Images image,
@formatId int,
@SubjctId int,
@return varchar(50) out
as
begin transaction
if @BiblioId = -1
begin
insert into legislation(recorddate)values(getdate())
declare @maxParentID int
select @maxparentID = max(ID) from legislation
insert into Biblio(FormatID,SubjectID,BiblioTitle,Writer,Backdata,PlaceOfPub,DateOfPub,Text_Summary,U ...
Go to the complete details ...