Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Can't add new records in SQL Server Express 2014 through MSMS

  • 20-04-2016 7:04pm
    #1
    Registered Users, Registered Users 2 Posts: 8,081 ✭✭✭


    So I'm very new to databases and am currently working on my final year project (Visual basic application which connects to a SQL Server 2014 Express database).

    With the above said I've suddenly come up against a weird issue. I'm unable to add any new records through Microsoft Server Management Studio. Haven't attempted yet through vb code, haven't gotten that far yet in the coding :p

    I select a table (any in the database, doesn't matter which), select edit top 200 rows and try to add a new record. It lets me fill in the fields as before, I then hit execute SQL and it removes the record that I'm trying to add. Hitting refresh table doesn't change anything, just shows the state of the database before I tried to add the record.

    I thought that I may have hit a limitation for the free version but max datafile size is 10gb and according to the database properties I have 97mb free of a pre selected 105mb size thus can't be that. It's probably something stupid but I can't for the life of me figure out what.

    Thanks for any illumination!


Comments

  • Registered Users, Registered Users 2 Posts: 8,081 ✭✭✭BKtje


    Right I've figured it out, was being a n00b :D


  • Registered Users, Registered Users 2 Posts: 1,717 ✭✭✭Raging_Ninja


    BKtje wrote: »
    Right I've figured it out, was being a n00b :D

    At least tell us what you were doing wrong in case anybody else has the same problem.


  • Registered Users, Registered Users 2 Posts: 8,081 ✭✭✭BKtje


    Too embarrassing to tell :p

    When entering data into a row I'd hit "execute SQL" before selecting the next row thus no SQL statement would be executed as it wouldn't have been properly formed. Just selecting another record or hitting the down arrow to prepare a new row for entry and then hitting "Execute SQL"does the trick. Did it 100 times already and just in my sleep deprived state I forgot about it :)


  • Registered Users, Registered Users 2 Posts: 586 ✭✭✭Aswerty


    I might be picking up what you're doing wrong but there isn't any need to hit the "Execute SQL" button. Just hitting enter or the down arrow should by itself be sufficient. The SQL that is executed when you hit that button is just a select statement for the top 200 rows - it has nothing to do with the updating/inserting of data to the table. In fact there should be a small button with "SQL" written on it to the left of the "Execute SQL" button that displays the SQL that returns the 200 editable rows. You can then edit this SQL then to increase the number of rows you can edit (or whatever else you want to do).


  • Registered Users, Registered Users 2 Posts: 8,081 ✭✭✭BKtje


    Cheers. It's the little things that help efficiency :D


  • Advertisement
Advertisement