July 2, 2011 at 7:11 am
Hi All,
Im new to the forum 🙂
Iv just added a new column to my table and for some reason it says its invalid,
the column name is DateCreated and iv even change the column name to [DateCreated] and still it says noooooooooo
iv attached two screen prints one of it saying invalid column in a SP and the other is a layout of the table it self.
the column is laid out as a char if that makes a difference?
the reason its a char is because im VB.net im building the date as a string and then passing that through to SQL.
July 2, 2011 at 7:15 am
Edit -> Intellisense -> Refresh Local Cache
(or Ctrl-Shift-R)
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 2, 2011 at 7:16 am
ooo well would you look at that haha!
Thanks for the response 🙂
July 2, 2011 at 7:27 am
It wasn't SQL telling you the column was invalid, had you run the insert it would have run just fine. It was just Management Studio's Intellisense. It doesn't update after every schema change (can be good, it could really hurt a server doing that), so you need to wait, ignore the warnings or manually update the cache.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 2, 2011 at 7:28 am
p.s. Store dates in a datetime. You're setting yourself up for a world of pain by storing it as a char. Doesn't matter that it's passed as a string, SQL can and will convert as long as it understands the format.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 2, 2011 at 7:30 am
Oh ok thanks, iv only ever used SQL for bits and pieces but i want to go more in depth with it 🙂 thanks for your advice and notes 🙂
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply