Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. How to edit a view

How to edit a view

Scheduled Pinned Locked Moved Database
questionannouncementdatabasesql-serversysadmin
2 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    I am putting together a web site that includes a SQL Server Express 2008 file. I use VWD 2008 Express and SQL Server Management Studio 2008. It is not designated as an Express version. I have a number of tables and have developed a view between two of them. I have a web page where I want to add, edit and delete records from the second table. The first table has two columns- a UID column and a use name column. The second table has a UID column that relates the two tables. The other columns are a Use name column, a DID column a NID column and a NID name column. Why, when I click on the GridView tasks button and go to configure datasource, accept the connection string, go to the next form and check "specify columns from a table or view" and select K-Use K-UseUseSet, the name of the view I created, and check all the columns- UID, Use, DID, NID and Name, why when I check "advanced" do I find the items "Generate INSERT,UPDATE AND DELETE statements" and "Use optimistic concurrency" shaded out so I can't select them and therefore can't do the Edit and Delete commands in the Gridview? Yes, I know the GRidView doesn't do adds. I have to use a DetailsView. What am I missing? Try not to give me any pages from MSFT. They are usually very optuse and talk in terms I don't understand. My background is Access and I have had very good results with it. The file I am presently working on came from Access. Specifically, I'd like to know what to click on to make this sort of scenario workable. Essentially, the question is how does one add, change and delete records when the table to be changed is a relation of two or more tables in a view? I appreciate your help.

    A 1 Reply Last reply
    0
    • L Lost User

      I am putting together a web site that includes a SQL Server Express 2008 file. I use VWD 2008 Express and SQL Server Management Studio 2008. It is not designated as an Express version. I have a number of tables and have developed a view between two of them. I have a web page where I want to add, edit and delete records from the second table. The first table has two columns- a UID column and a use name column. The second table has a UID column that relates the two tables. The other columns are a Use name column, a DID column a NID column and a NID name column. Why, when I click on the GridView tasks button and go to configure datasource, accept the connection string, go to the next form and check "specify columns from a table or view" and select K-Use K-UseUseSet, the name of the view I created, and check all the columns- UID, Use, DID, NID and Name, why when I check "advanced" do I find the items "Generate INSERT,UPDATE AND DELETE statements" and "Use optimistic concurrency" shaded out so I can't select them and therefore can't do the Edit and Delete commands in the Gridview? Yes, I know the GRidView doesn't do adds. I have to use a DetailsView. What am I missing? Try not to give me any pages from MSFT. They are usually very optuse and talk in terms I don't understand. My background is Access and I have had very good results with it. The file I am presently working on came from Access. Specifically, I'd like to know what to click on to make this sort of scenario workable. Essentially, the question is how does one add, change and delete records when the table to be changed is a relation of two or more tables in a view? I appreciate your help.

      A Offline
      A Offline
      Ashfield
      wrote on last edited by
      #2

      You can't update a multi-table view, thats what your problem is.

      Bob Ashfield Consultants Ltd Proud to be a 2009 Code Project MVP

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups