Click here to Skip to main content
15,901,035 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all,

i had created one table and i declare all the required columns needed.
but when i am writing the stored procedure i.e add,update inthat when i am using those variables it is showing error message as invalid columnname in add procedure and declare scalar variable in update procedure.

can u please tell what to do in table?suggest me. :)

SQL
UPDATE ConferenceRoom SET
        EmployeeName=@EmployeeName,
        PurposeOfBooking=@PurposeOfBooking,
        StartDate=@StartDate,
        EndDate=@EndDate,
        StartTime=@StartTime,
        EndTime=@EndTime,
        ConferenceRoom=@ConferenceRoom



C++
SELECT TOP 1000 [EmployeeName]
      ,[PurposeOfBooking]
      ,[StartDate]
      ,[EndDate]
      ,[StartTime]
      ,[EndTime]
      ,[ConferenceRoom]
  FROM [HDCHRMSDB].[dbo].[ConferenceRoom]




C++
dbo.ConferenceRoom
EmployeeName         varchar(MAX)    Checked
PurposeOfBooking     varchar(MAX)    Checked
StartDate             datetime       Checked
EndDate               datetime       Checked
StartTime             time(7)        Checked
EndTime               time(7)        Checked
ConferenceRoom        varchar(50)    Checked
        Unchecked


i declared in this way only.eventhough error is coming.
Posted
Updated 16-Feb-11 2:48am
v4
Comments
Sunasara Imdadhusen 16-Feb-11 7:42am    
Please provide snippet of code!!
mandarapu 16-Feb-11 8:14am    
check the code i provided.
fjdiewornncalwe 16-Feb-11 8:27am    
Thanks for adding the snippet. Could you add a little more and include the stored procedure argument list and the table create structure? I think that Om Prakash Pant's answer below is correct in that you probably just have a very minor syntax issue, but we need to see the other parts in order to verify this.
mandarapu 16-Feb-11 8:46am    
please check with my updated one plz

1 solution

check the column names are correct & the variables which has been used is correct.
 
Share this answer
 
Comments
fjdiewornncalwe 16-Feb-11 8:28am    
Based on the information the OP has provided, and just as good practice in these situations, this is a reasonable course of action.

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