简体   繁体   中英

How can I add rows to my SQL Server database with VS2012?

I am using VS2012 and a connection string looking like:

Data Source=(LocalDb)\v11.0;AttachDbFilename=C:\xxx\WebUx\App_Data\aspnet-WebUx-20121229.mdf;Initial Catalog=aspnet-WebUx-20121229;Integrated Security=True

When I select

Server Explorer > Default Connection > tables > table > Show Table Data 

then I can see the data, I can even update a column in the data but the icon to add a new row is blank and I cannot add a new row. Has anyone else had this problem?

Yes I can see this question is over a year old but I don't see an answer so:

After you enter in the information in your last field just hit the TAB button it will save the row you were working on and will move you to the next row to add another row. If you're focus is not in the last field of that row then the TAB button will move you from the field you are in to the next field.

Make sure that any field that is set up to not allow NULL's has something entered in that row's field or it will throw an error and not update the row.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM