December 17, 2012 at 4:55 am
hai freinds
i wrote the query for login page if already user again registered means it ll through error unfortunately my query display in valid column of "EMAIL".
CREATE PROCEDURE sp_userinformation
(
@UserName varchar(50),
@Password varchar(50),
@FirstName varchar(50),
@LastName varchar(50),
@Email varchar(50),
@PhoneNo varchar(50),
@Location varchar(50),
@Created_By varchar(50),
@ERROR VARCHAR(100)
)
AS
BEGIN
SET NOCOUNT ON;
IF NOT EXISTS(SELECT * FROM User_Information WHERE UserName=@UserName)
BEGIN
INSERT INTO User_Information
(
UserName,
[Password],
FirstName,
LastName,
Email,
PhoneNo,
Location,
Created_By
)
VALUES
(
@UserName,
@Password,
@FirstName,
@LastName,
@Email,
@PhoneNo,
@Location,
@Created_By
)
SET @ERROR=@UserName+' Registered Successfully'
END
ELSE
BEGIN
SET @ERROR=@UserName + ' Already Exists'
END
END
December 17, 2012 at 5:04 am
The error is saying that there is no EMAIL column in the table User_Information.
Try this: -
SELECT name
FROM sys.columns
WHERE [object_id] = OBJECT_ID('dbo.User_Information');
That should list all of your column names for that table. Check for EMAIL and I bet it's not there.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply