Developer technologies | Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
A community member has associated this post with a similar question:
Double entry on one button click ,asp.net c# webform
Only moderators can edit this content.
I am currentyl facing issue ,that user click one time on Button ,then entry get inserted two time in system, so i want to set interval of 4 second between entries,mean that if User insert time 11:15:14 ,if user try to save another entry then it take 4 second ,means that next entry save on 11:15:19.
below is conde
ALTER PROCEDURE [dbo].[spInsertPorderder]
-- Add the parameters for the stored procedure here
@Codeitem int,
@OrderNo int,
@prdqty int,
@IDWoker int,
@EntryDate date,
@FID int,
@Weight int,
@SecID int,
@Rmk varchar (50),
@ETime time(7),
@BrefNo varchar (50),
@IPAddress [varchar](50) ,
@Gweigth int,
@OID int output
AS
BEGIN
SET NOCOUNT ON;
IF NOT EXISTS
(
SELECT ETIME, IPAddress,EntryDate FROM Probale
WHERE ETIME = @ETIME and IPAddress = @IPAddress and EntryDate=@EntryDate and Codeitem=@Codeitem
)
Begin
insert into Probale(Codeitem,OrderNo,prdqty,IDWokrer,EntryDate,FID,Weigth,SecID,Rmk,ETime,BrefNo,IPAddress,Gweigth )
values(@Codeitem,@OrderNo,@prdqty,@IDWoker,@EntryDate,@FID,@Weight,@SecID,@Rmk,@ETime,@BrefNo,@IPAddress,@Gweigth )
set @OID=SCOPE_IDENTITY()
end
end