Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
seyha_moth
Yak Posting Veteran
74 Posts |
Posted - 2007-03-09 : 06:04:04
|
| Dear sir or MadameI have problem related to create message error in sqlserver then assign to asp.net. I want to show error message in vb.net when It found existing record in other table.CREATE PROC proc_SignUpUserVideo @pUserName nvarchar(50), @pPassword nvarchar(50), @pCountry nvarchar(50), @pPostCode nvarchar(10), @pGender int, @pDOB datetime, @pEmail nvarchar(50), @pRegisterDate datetimeAS DECLARE @HasUser nvarchar(1) SELECT @HasUser=Count(*) FROM tblUser WHERE UserName=@pUserName IF @HasUser=0 or @HasUser=NULL BEGIN INSERT INTO tblVideoUser(UserName,Password,Country,PostCode,Gender, DOB,Email,RegisterDate) VALUES(@pUserName,@pPassword,@pCountry,@pPostCode,@pGender, @pDOB,@pEmail,@pRegisterDate) END ELSE 'Show Error MessageHow should I do?Thank you in advance!Best regard. seyha moth |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-03-09 : 06:05:39
|
| look into Raiserror in BOL_____________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenp |
 |
|
|
|
|
|
|
|