| Author |
Topic |
|
alok.mailbox
Starting Member
2 Posts |
Posted - 2008-06-18 : 00:27:14
|
| set ANSI_NULLS ONset QUOTED_IDENTIFIER ONgoALTER PROCEDURE [dbo].[usp_World_Ins_data] -- Add the parameters for the stored procedure here @UserName nvarchar(50), @Password nvarchar(15), @Email nvarchar(100), @IsChecked bit, @ReceiveNews bitASBEGIN SET NOCOUNT ON; IF EXISTS(SELECT UserName FROM World_Registration WHERE UserName=@UserName) RAISERROR('Username exists',16,1)ELSE IF EXISTS(SELECT Email FROM World_Registration WHERE Email=@Email) RAISERROR('Email exists',16,1)ELSE INSERT INTO World_Registration(UserName,Password,Email,IsChecked,ReceiveNews) VALUES(@UserName,@Password,@Email,@IsChecked,@ReceiveNews)ENDif executed once it works properly like[usp_World_Ins_data] 'aa','aa','ravinderpal@netbiz.in','1','1'while if i m trying to execute stored procedure like this three timesi mean more than one time[usp_World_Ins_data] 'aa','aa','ravinderpal@netbiz.in','1','1'[usp_World_Ins_data] 'aa','aa','ravinderpal@netbiz.in','1','1'[usp_World_Ins_data] 'aa','aa','ravinderpal@netbiz.in','1','1'it gives error:Msg 170, Level 15, State 1, Line 2Line 2: Incorrect syntax near 'usp_World_Ins_data'.pls help me |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-06-18 : 00:50:43
|
| seperate them by GO and try[usp_World_Ins_data] 'aa','aa','ravinderpal@netbiz.in','1','1'GO[usp_World_Ins_data] 'aa','aa','ravinderpal@netbiz.in','1','1'GO[usp_World_Ins_data] 'aa','aa','ravinderpal@netbiz.in','1','1' |
 |
|
|
alok.mailbox
Starting Member
2 Posts |
Posted - 2008-06-18 : 00:57:26
|
| thank's visakh16..but what was happenning behind that error.. can u pls tell me |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-06-18 : 01:14:20
|
quote: Originally posted by alok.mailbox thank's visakh16..but what was happenning behind that error.. can u pls tell me
Each sp call should be in seperate batch |
 |
|
|
|
|
|