Your problem is that your SQL server basically stores a query map of the original query. Even though you pass it * when it actually runs the query it has to map out which queries that actually is. The next time you call it, it runs based on the last map. It's usually a good practice to stay away form * for several reasons. One is just readability for other developers who see your queries. Another is that there's no sense in grabbing data you don't need. Another is what you've pointed out. This is a known "issue" with SQL server and the only way to make it refresh the map is to restart the SQL service as far as I know. I'd recommend staying away from the * if you can.
John Burns -----Original Message----- From: Brent Shaub [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 16, 2006 12:39 PM To: CF-Talk Subject: Select * in a view needs "recompiled" Using MS SQL Server, I have a view that pulls a table with a "*". I added a column to that table, and the view's data did not reflect the new column right away. In Query Analyzer, if I ran the view after adding the column from right-click "Open View", the new column wasn't there. If I went into design mode and clicked the "!", the new column was there. So in design mode, I added a space and deleted it in the SQL then saved the view. Now I can see the new column from right-click "Open View". I'm a bit let down the * isn't as dynamic as it seems. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:250012 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4