Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2003
    Posts
    3

    Unanswered: SQL bug in views?

    Hello

    I've set up various asp pages which display information from tables in a SQL database. I've created a view which collects the table columns together and this is referenced in my SELECT FROM statement on each asp page.

    However, whenever I delete/rename or add a new table column from the view output in Enterprise Manager, it seems to have the side-effect of randomly preventing other columns from displaying data in the asp page.

    This is really annoying and I can only reinstate a column if I create a replica with the same data but a different name and change the asp page accordingly.

    Perhaps I'm missing something really simple - maybe this is some kind of database setting? Maybe it's some kind of SQL bug? Any suggestions would be much appreciated.

  2. #2
    Join Date
    Sep 2003
    Posts
    3
    Whenever you alter a table by adding or removing columns, you have to refresh all the views depending on that table.

    Do the following on all the affected views:


    EXEC sp_refreshview ViewName

    switching the "ViewName" for your view name.


    HM

  3. #3
    Join Date
    Sep 2003
    Posts
    3
    Just tried refreshing the view without success.

    All I'm doing is adding or removing table columns from the view, and this seems to have a completely unpredictable knock-on effect on other columns, preventing the data being displayed in the asp pages.

    I can only seem to reinstate columns via a process of trial and error - opening Enterprise Manager and unchecking the output box, closing it down, reopening and checking the boxes again. However, there's always at least one other column that then becomes affected.

    Very frustrating!

  4. #4
    Join Date
    Sep 2003
    Posts
    3
    Sorry, I can't seem to replicate the problem

    Maybe, you can write the view by changing the script itself when you click on 'Properties' of the view as opposed to changing the view in Designer mode.

    HM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •