locked
eddit database in VS2008 RRS feed

  • Question

  • User988652318 posted

    Hello

    i want to eddit my database that i create in SQL . waht is the best tool for that in VS2008 ? i need this answer quickly.

    thanks

    Sunday, September 11, 2011 2:23 PM

Answers

  • User-1835172754 posted

    first of all you must have Primery key for your table

    when you are attaching database in Visual Studio you must  enable " insert and update and edit mode ". then by right click on your gridview you could have insert , edit , update buttun in your table.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, September 12, 2011 1:26 AM
  • User560751820 posted

    i have primery key but still the edit and update options dosent exist ? what is the problem ?

    look at this screeshot and do the following..

    select the table name and fields , Click on Advance tab and check Generate Insert,Edit and Delete statements checkbox ..

    then after finishing right click ur gridview in design and check enable editing ur done...


    Image and video hosting by TinyPic

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 13, 2011 1:10 AM
  • User-1835172754 posted

    go to the gridview task / choose datasource / choose your data connection and NEXT / NEXT / Choose your Table and select "ADVANCE" and in this panel you must enable insert , update , delete .

    i hope in this case its work.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 13, 2011 1:37 AM

All replies

  • User617492218 posted

    use entity framework or linq to sql

    - linq to sql - add .dbml file and drag in tables

    http://weblogs.asp.net/scottgu/archive/2007/05/19/using-linq-to-sql-part-1.aspx

    (there are 7 parts to this that scott gu explains how to use L2S)

    - entity framework - add entity model and add tables

    http://www.codeguru.com/csharp/csharp/net30/article.php/c15489

    http://msdn.microsoft.com/en-us/library/bb399572.aspx 

    http://msdn.microsoft.com/en-us/library/bb386876.aspx

    make sure that your tables already have their relationships designed by the database diagrams in SQL first before using any of these.

    Sunday, September 11, 2011 2:50 PM
  • User-1835172754 posted

    first of all you must have Primery key for your table

    when you are attaching database in Visual Studio you must  enable " insert and update and edit mode ". then by right click on your gridview you could have insert , edit , update buttun in your table.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, September 12, 2011 1:26 AM
  • User560751820 posted

    refer this link..

    http://csharpdotnetfreak.blogspot.com/2009/05/gridview-sqldatasource-insert-edit.html

    NOTE: you must have a primary key in ur table to do this

    Monday, September 12, 2011 1:35 AM
  • User988652318 posted

    i have primery key but still the edit and update options dosent exist ? what is the problem ?

    Monday, September 12, 2011 3:03 PM
  • User3866881 posted

    i have primery key but still the edit and update options dosent exist ? what is the problem ?

    Hello,

    Your question is too abstract…… And maybe you haven't updating sql statement?

    Would you mind showing us your sample?

    Thx again

    Monday, September 12, 2011 10:35 PM
  • User560751820 posted

    i have primery key but still the edit and update options dosent exist ? what is the problem ?

    look at this screeshot and do the following..

    select the table name and fields , Click on Advance tab and check Generate Insert,Edit and Delete statements checkbox ..

    then after finishing right click ur gridview in design and check enable editing ur done...


    Image and video hosting by TinyPic

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 13, 2011 1:10 AM
  • User-1835172754 posted

    go to the gridview task / choose datasource / choose your data connection and NEXT / NEXT / Choose your Table and select "ADVANCE" and in this panel you must enable insert , update , delete .

    i hope in this case its work.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 13, 2011 1:37 AM