I didn't modify the ID column, I tried do conform to tutorial:
Click the Title column and enter "When Harry Met Sally". Move to the Genre column (you can use the Tab key) and enter "Romantic Comedy". Move to the Year column and enter "1989":
There is a bug in WebMatrix 3 which doesn't allow you to add data to a table through the Database interface as described in the tutorial. You can instead click in on the Home tab and then click New Query. Then add the following and press Execute:
INSERT INTO Movies (Title, Genre, Year) VALUES ('When Harry Met Sally', 'Romantic Comedy', '1989')
Member
1 Points
3 Posts
Newbie problem - Adding data to table
Jun 13, 2013 12:37 PM|Pham Anh Tuan|LINK
I have a problem when learning tutorial at:
http://www.asp.net/web-pages/tutorials/introducing-aspnet-web-pages-2/displaying-data
part - Adding Some Example Data
I tried add some data in first row but it appearred error:
"Invalid data
Your change could not be committed to the database.
After you click OK you can fix the invalid entry or press the Esc key to cancel your changes.
The column cannot be modified. [ Column name = ID ]"
Can anyone help me?
My English writing skill is so bad! :-((
Participant
1447 Points
641 Posts
Re: Newbie problem - Adding data to table
Jun 13, 2013 12:41 PM|Abhishek Luv|LINK
Hi Dear,
IsIndentity has to be true for the ID Column so that it gets auto incremented everytime.
http://www.abhishekluv.in
Github: https://github.com/abhishekluv
Member
1 Points
3 Posts
Re: Newbie problem - Adding data to table
Jun 13, 2013 01:02 PM|Pham Anh Tuan|LINK
I didn't modify the ID column, I tried do conform to tutorial:
Click the Title column and enter "When Harry Met Sally". Move to the Genre column (you can use the Tab key) and enter "Romantic Comedy". Move to the Year column and enter "1989":
Press Enter then error occurred.
Member
574 Points
652 Posts
Re: Newbie problem - Adding data to table
Jun 13, 2013 02:50 PM|dow7|LINK
All-Star
194016 Points
28029 Posts
Moderator
Re: Newbie problem - Adding data to table
Jun 13, 2013 03:20 PM|Mikesdotnetting|LINK
There is a bug in WebMatrix 3 which doesn't allow you to add data to a table through the Database interface as described in the tutorial. You can instead click in on the Home tab and then click New Query. Then add the following and press Execute:
INSERT INTO Movies (Title, Genre, Year) VALUES ('When Harry Met Sally', 'Romantic Comedy', '1989')
Change the values to add additional rows of data.
Member
1 Points
3 Posts
Re: Newbie problem - Adding data to table
Jun 13, 2013 08:56 PM|Pham Anh Tuan|LINK
Thanks Mikesdotnetting!