Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#

Column 'RegistrationID' does not belong to table Table. what is this error?
Posted
Comments
Syed Shabeer 1-Aug-13 8:45am    
"Table" is a physical table or data table? Check whther the column exists in that table
santoshroyal 1-Aug-13 9:06am    
It is exists

the column name is not available in the table which you have fetched from database.run the query in databese and check for the column name
 
Share this answer
 
seems like column with this name does not exist in your table..
check for spelling of your ColumnName in table and ColumnName in your query, both should match.

and we can exactly tell the prob. if you can share your table structure and your query/peice of code
 
Share this answer
 
v2
Comments
santoshroyal 1-Aug-13 8:52am    
it is same as in database table
santoshroyal 1-Aug-13 8:57am    
still am getting that error
Adarsh chauhan 1-Aug-13 9:06am    
share your table structure and your query.. only then I can help you out.
santoshroyal 1-Aug-13 9:11am    
ALTER PROCEDURE [dbo].[usp_Request_SELECT_ALL]
@AppCategory INT =0,
@Thought NVARCHAR(50)=''
AS

IF(@AppCategory>0)
BEGIN
SELECT Re.RequestID,A.Name AppCategory,O.Name Os,Re.Thought,Re.[Status],R.Name,R.RegistrationID
FROM Request Re,AppCategory A,Os O,Registration R
WHERE R.RegistrationID = Re.UserID AND A.AppCategoryID = Re.AppCategory AND O.OSID = Re.Os AND Re.AppCategory=@AppCategory AND Re.Thought LIKE '%'+@Thought+'%'
END
ELSE IF(@AppCategory=0)
BEGIN
SELECT Re.RequestID,A.Name AppCategory,O.Name Os,Re.Thought,Re.[Status],R.Name,R.RegistrationID
FROM Request Re,AppCategory A,Os O,Registration R
WHERE R.RegistrationID = Re.UserID AND A.AppCategoryID = Re.AppCategory AND O.OSID = Re.Os AND Re.Thought LIKE '%'+@Thought+'%'
END
santoshroyal 1-Aug-13 9:09am    
CREATE TABLE [dbo].[Registration](
[RegistrationID] [int] IDENTITY(1,1) NOT NULL,
[Name] [nvarchar](50) NULL,
[DOB] [nvarchar](50) NULL,
[EmailID] [nvarchar](50) NULL,
[Password] [nvarchar](50) NULL,
[Pic] [nvarchar](50) NULL,
[IsActive] [bit] NULL

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900